mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
Return the jquery object for el when this.$ is called without argument
This commit is contained in:
@@ -913,7 +913,11 @@
|
||||
// This should be prefered to global lookups, if you're dealing with
|
||||
// a specific view.
|
||||
var selectorDelegate = function(selector) {
|
||||
return $(selector, this.el);
|
||||
if (typeof selector == 'undefined') {
|
||||
return $(this.el);
|
||||
} else {
|
||||
return $(selector, this.el);
|
||||
};
|
||||
};
|
||||
|
||||
// Cached regex to split keys for `delegate`.
|
||||
|
||||
Reference in New Issue
Block a user