From: jzaefferer Date: Thu, 17 Mar 2011 10:59:32 +0000 (+0100) Subject: Widget: Accept selectors and DOM elements as element-argument to _bind X-Git-Tag: 1.9m5~211 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0872aac982f572f626275a74d1e74ce73a11ed0d;p=jquery-ui.git Widget: Accept selectors and DOM elements as element-argument to _bind --- diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 10a25b611..6c6ba3864 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -262,6 +262,8 @@ $.Widget.prototype = { handlers = element; element = this.element; } else { + // accept selectors, DOM elements + element = $( element ); this.bindings = this.bindings.add( element ); } var instance = this;