Pascal Lindelauf Pascal Lindelauf - 1 month ago 16
jQuery Question

Determining if JQuery effects are still executing

For running Cucumber specs with Capybara and Selenium, I need to be able to determine if certain JQuery effects have completed before I can continue with the next step. Is there a generic way to determine if JQuery is still executing effects (e.g. something like

$.effects.active.size == 0
)?

Answer

You can check if element is used by some animation plugin/feature via checking :animated selector

according to this: http://api.jquery.com/animated-selector/

like this:

$("#el").is(":animated")

more info: How do I find out with jQuery if an element is being animated?