diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js index 0296b9e4f..5efd91268 100644 --- a/tests/unit/widget/widget_core.js +++ b/tests/unit/widget/widget_core.js @@ -83,7 +83,7 @@ test( "custom selector expression", function() { var elem = $( "
" ).appendTo( "#qunit-fixture" ); $.widget( "ui.testWidget", {} ); elem.testWidget(); - deepEqual( $( ":ui-testWidget" )[0], elem[0] ); + deepEqual( $( ":ui-testwidget" )[0], elem[0] ); elem.testWidget( "destroy" ); }); diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 628b63bb0..b5dfaa344 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -36,7 +36,7 @@ $.widget = function( name, base, prototype ) { } // create selector for plugin - $.expr[ ":" ][ fullName ] = function( elem ) { + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { return !!$.data( elem, fullName ); };