javascript - What is the difference between $el and el in Backbone.js views? -


can please tell difference between $el , el in backbone.js views?

lets this

var myel = this.el; // here have html element,                      //you able access(read/modify) html                      //properties of element, 

with this

var my$el = this.$el; // have element                        //with of functions jquery provides like,                       //hide,show  etc, equivalent of $('#myel').show();                       //$('#myel').hide(); this.$el keeps reference                        //element don't need traverse dom find                       // element every time use it. performance benefits                        //that implies. 

one html element , other jquery object of element.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -