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