From: Timmy Willison Date: Thu, 3 Mar 2016 20:33:57 +0000 (-0500) Subject: Selector: filters -> pseudos X-Git-Tag: 3.0.0-rc1~66 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0402963845be8d71c4e8ddf65e7c055014739b60;p=jquery.git Selector: filters -> pseudos Fixes gh-2073 Close gh-2969 --- 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;