Made minor optimization to scoped jQuery/Zepto method $ on the Backbone.View

This commit is contained in:
Doug Neiner
2012-01-29 00:43:45 -06:00
parent 028771fcab
commit e1762ed077

View File

@@ -996,7 +996,7 @@
// jQuery delegate for element lookup, scoped to DOM elements within the
// current view. This should be prefered to global lookups where possible.
$: function(selector) {
return $(selector, this.el);
return $(this.el).find(selector);
},
// Initialize is an empty function by default. Override it with your own