mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-22 21:38:00 -05:00
Merge pull request #897 from dcneiner/jquery-zepto-context
Made minor optimization to scoped jQuery/Zepto method $ on the Backbone.View
This commit is contained in:
@@ -984,7 +984,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
|
||||
|
||||
Reference in New Issue
Block a user