# Backbone.js Tutorial - 10 - (Views) Events (ok)

![](https://2726517656-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1E4Gk2ppVKb4olmnun%2F-MS1cniaWd7vR1luHjvE%2F-MS2AQ51DCdK9kHYjRl0%2FScreenshot_1.jpg?alt=media\&token=1f1e1909-98ce-476b-bdb4-b3884bdc1322)

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

```
var theView = Backbone.View.extend({
	initialize: function() {
		this.render();
 	},
	render: function() {
		var template = _.template($("#ourTemplate").html(),{});
		this.$el.html(template);
	},
	events: {
		"click": "clicked"
	},
	clicked: function(event) {
		console.log('clicked');
	}
});
jQuery(document).ready(function($) {
	var page = new theView({el: $("#div1")});
});
```

![](https://2726517656-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1E4Gk2ppVKb4olmnun%2F-MS2BoEyX2dNWbodoRy8%2F-MS2CKYunRvjCQIwZGIE%2FScreenshot_2.jpg?alt=media\&token=66e37ca4-5f4e-4b1f-b6e3-c14fad16171d)

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

```
var theView = Backbone.View.extend({
	initialize: function() {
		this.render();
 	},
	render: function() {
		var template = _.template($("#ourTemplate").html(),{});
		this.$el.html(template);
	},
	events: {
		"click": "clicked",
		"mouseover": "mouseover"
	},
	clicked: function(event) {
		console.log('clicked');
	},
	mouseover: function(event) {
		console.log('mouseover');
	}
});
jQuery(document).ready(function($) {
	var page = new theView({el: $("#div1")});
});
```
