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) || something; };    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -