(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
elhere. 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…
tagName,className,idandattributesproperties of the view. If you don’t specify an element, it defaults to adivIt’s all in the official documentation actually…