diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.widget.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index d154185d5..a66b8a54a 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -322,10 +322,10 @@ $.Widget.prototype = { var match = event.match( /^(\w+)\s*(.*)$/ ), eventName = match[1] + "." + instance.widgetName, selector = match[2]; - if ( selector === '' ) { - element.bind( eventName, handlerProxy ); - } else { + if ( selector ) { element.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); } }); }, |