aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.core.js
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2012-07-07 14:28:52 -0400
committerScott González <scott.gonzalez@gmail.com>2012-07-07 14:28:52 -0400
commit2d643032c553ea2804946b4f0cdba4b7820e1bfc (patch)
treef57568ae623ab93ca5b6d15001c754de231985e8 /ui/jquery.ui.core.js
parent5a952856a0013c44bde67f9fcfd7e47826d8cf15 (diff)
downloadjquery-ui-2d643032c553ea2804946b4f0cdba4b7820e1bfc.tar.gz
jquery-ui-2d643032c553ea2804946b4f0cdba4b7820e1bfc.zip
Core: Adjust data pseudo creation to use new Sizzle pseudo creation for pseudos with arguments.
Diffstat (limited to 'ui/jquery.ui.core.js')
-rw-r--r--ui/jquery.ui.core.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js
index ad0ab25d7..3e102f181 100644
--- a/ui/jquery.ui.core.js
+++ b/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" ) ) );