From 0402963845be8d71c4e8ddf65e7c055014739b60 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Thu, 3 Mar 2016 15:33:57 -0500 Subject: [PATCH] Selector: filters -> pseudos Fixes gh-2073 Close gh-2969 --- src/css/hiddenVisibleSelectors.js | 6 +++--- src/effects/animatedSelector.js | 2 +- src/selector-sizzle.js | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/css/hiddenVisibleSelectors.js b/src/css/hiddenVisibleSelectors.js index 9a8a28cf8..e155acda7 100644 --- a/src/css/hiddenVisibleSelectors.js +++ b/src/css/hiddenVisibleSelectors.js @@ -3,10 +3,10 @@ define( [ "../selector" ], function( jQuery ) { -jQuery.expr.filters.hidden = function( elem ) { - return !jQuery.expr.filters.visible( elem ); +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); }; -jQuery.expr.filters.visible = function( elem ) { +jQuery.expr.pseudos.visible = function( elem ) { return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); }; diff --git a/src/effects/animatedSelector.js b/src/effects/animatedSelector.js index d84c9c703..2fe1f71a7 100644 --- a/src/effects/animatedSelector.js +++ b/src/effects/animatedSelector.js @@ -4,7 +4,7 @@ define( [ "../effects" ], function( jQuery ) { -jQuery.expr.filters.animated = function( elem ) { +jQuery.expr.pseudos.animated = function( elem ) { return jQuery.grep( jQuery.timers, function( fn ) { return elem === fn.elem; } ).length; diff --git a/src/selector-sizzle.js b/src/selector-sizzle.js index 678df0975..1dc0ea324 100644 --- a/src/selector-sizzle.js +++ b/src/selector-sizzle.js @@ -5,6 +5,8 @@ define( [ jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; + +// Deprecated jQuery.expr[ ":" ] = jQuery.expr.pseudos; jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; -- 2.39.5