(function ($) {
window.AppView = Backbone.View.extend({
el: $("body"),
events: {
"click #add-friend": "showPrompt",
},
showPrompt: function () {
var friend_name = prompt("Who is your friend?");
}
});
var appview = new AppView;
})(jQuery);
- Can anyone explain me what is
el
here. Is it element? - Does the el argument accept object, if so can i pass my custom view object where my button or elements need to be added...