var WebsiteModel = Backbone.Model.extend({
default: {
name: 'Website'
},
initialize: function() {
this.bindEvents();
},
bindEvents: function() {
console.log('aaaaa');
}
});
jQuery(document).ready(function($) {
var page = new WebsiteModel();
console.log(page);
});
var WebsiteModel = Backbone.Model.extend({
default: {
name: 'Website'
},
initialize: function() {
this.bindEvents();
},
bindEvents: function() {
this.on('change:name',function(model) {
var getname = model.get("name");
console.log(getname);
})
}
});
jQuery(document).ready(function($) {
var page = new WebsiteModel();
page.set({name: "Lionel"})
});