# Backbone.js Tutorial - 4 - Model Change Events ( ok)

C:\Users\Administrator\Desktop\gulp\app.js

![](https://2726517656-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1E4Gk2ppVKb4olmnun%2F-MS1JxWby4kauTnkFqup%2F-MS1N0qcURlocEIKFGuI%2FScreenshot_1.jpg?alt=media\&token=83a3f544-75b0-4d67-bfe4-e7ef6a6190b3)

```
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);
});
```

C:\Users\Administrator\Desktop\gulp\app.js

![](https://2726517656-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1E4Gk2ppVKb4olmnun%2F-MS1N2hyhYF_HI_p0jwC%2F-MS1O-MBFJb8cZAGUXYm%2FScreenshot_2.jpg?alt=media\&token=c5a429e2-b7e8-4050-9628-23d218e80eae)

```
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"})
});
```
