Skip to content
Permalink
Browse files

Widget delegation: Small if-simplify refactoring

  • Loading branch information
jzaefferer committed Jul 28, 2011
1 parent a57c435 commit 0ff3396e8853d1858db56e4ad7552f87c09e5504
Showing with 3 additions and 3 deletions.
  1. +3 −3 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 );
}
});
},

0 comments on commit 0ff3396

Please sign in to comment.
You can’t perform that action at this time.