From 7427d39b39d0e1f07a8dd5a4a9a879db1cd5d46b Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Sat, 7 Jul 2012 14:28:52 -0400 Subject: [PATCH] Core: Adjust data pseudo creation to use new Sizzle pseudo creation for pseudos with arguments. (cherry picked from commit 2d643032c553ea2804946b4f0cdba4b7820e1bfc) --- ui/jquery.ui.core.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js index 53aa51b5f..1d002ecea 100644 --- a/ui/jquery.ui.core.js +++ b/ui/jquery.ui.core.js @@ -205,9 +205,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" ) ) ); -- 2.39.5