The el property

Sunday, 27 October 2013

The el property

The el property

The “el” property  references the DOM object created in the browser. Every Backbone.js view has an “el” property, and if it not defined, Backbone.js will construct its own, which is an empty div element.
Let us set our view’s “el” property to div#search_container, effectively making Backbone.View the owner of the DOM element.



Note: Keep in mind that this binds the container element. Any events we trigger must be in this element.
Regards
owntutorials.com | Teach your self
maximetech.com | MaximeTech – A Way To Smarter Technologies
adpin.ws | URL Shorten Service

No comments:

Post a Comment

 

Total Pageviews

Blogroll

Most Reading