]> source.dussan.org Git - jquery-ui.git/commitdiff
Widget: Accept selectors and DOM elements as element-argument to _bind
authorjzaefferer <joern.zaefferer@gmail.com>
Thu, 17 Mar 2011 10:59:32 +0000 (11:59 +0100)
committerjzaefferer <joern.zaefferer@gmail.com>
Thu, 17 Mar 2011 10:59:32 +0000 (11:59 +0100)
ui/jquery.ui.widget.js

index 10a25b6119375390ce510f857bf3112e4fdb0bb4..6c6ba3864cf3a02cc17a719c9cb6a58baac7699d 100644 (file)
@@ -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;