Skip to content
Browse files

Core: Adjust data pseudo creation to use new Sizzle pseudo creation f…

…or pseudos with arguments.
  • Loading branch information...
1 parent 5a95285 commit 2d643032c553ea2804946b4f0cdba4b7820e1bfc @timmywil timmywil committed with scottgonzalez Jul 7, 2012
Showing with 10 additions and 3 deletions.
  1. +10 −3 ui/jquery.ui.core.js
View
13 ui/jquery.ui.core.js
@@ -216,9 +216,16 @@ function visible( element ) {
}
$.extend( $.expr[ ":" ], {
- data: function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
+ data: $.expr.createPseudo ?
+ $.expr.createPseudo(function( dataName ) {
+ return function( elem ) {
+ return !!$.data( elem, dataName );
+ };
+ }) :
+ // support: jQuery <1.8
+ function( elem, i, match ) {
+ return !!$.data( elem, match[ 3 ] );
+ },
focusable: function( element ) {
return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );

0 comments on commit 2d64303

Please sign in to comment.
Something went wrong with that request. Please try again.