Widget: Create lowercase pseudo selectors. Fixes #8433 - Widget: Create lowercase pseudo selectors.

This commit is contained in:
Scott González 2012-07-09 16:02:43 -04:00
parent 0fc3afb2a1
commit a79d09a905
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ test( "custom selector expression", function() {
var elem = $( "<div>" ).appendTo( "#qunit-fixture" );
$.widget( "ui.testWidget", {} );
elem.testWidget();
deepEqual( $( ":ui-testWidget" )[0], elem[0] );
deepEqual( $( ":ui-testwidget" )[0], elem[0] );
elem.testWidget( "destroy" );
});

View File

@ -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 );
};