Manually add ":animated" selector to jQuery objects -
I have a function that animates the DOM elements with CSS3 when available. Now I often use the : animated jQuery selector. How can I answer my CSS3 animated elements to : animated selector? When a DOM object is animated with jQuery, it becomes "fxqueue": "inprogress" is in the data object, so I was thinking that I would be manually I can use my elements from: $ ("div"). Eq (0). Data ({"fxqueue": "Inprogress"}); console.log ($ ("div: animated")) None selected Does. This will not work. : Animated is defined as a filter jQuery.expr.filters.animated = function (elem) {return jQuery.grep (jQuery. Timers, function (fn) {return elem === Fn.elem;}) Length; }; Checks whether the element is in jQuery.timers . Instead, you can change : animated selector: var originally estimated = jQuery.expr.filters.animated; JQuery.expr.filters.animated = Function (AMM) {Return Original Animated (AMM) || someth...