I am consoling the height, while it get changed, as well i am binding the change event to the element. still i am not getting the console output here...
i am very new to backbone, any one correct my mistake?
var Person = Backbone.Model.extend({
initialize:function(){
var getHeight = prompt('provide your height');
this.set({height:getHeight}); //i am changing the height...
this.bind('change:height',function(){
console.log(this.get('height')); //i am not getting any console here...
})
},
defaults:{
name:'new Name',
height:'unknown'
}
});
var person = new Person();