Find out if there is any transition

Is there any way to find out if there is currently a link on my page? Not for a specific element, but globally for the entire page?

thanks

+4
source share
1 answer

To see when the css transition ended, you can use transitionend.

The transition event occurs when the CSS transition completes.

source: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/transitionend

Where you can simply use the flags to see when the animation has finished and when not. Here is an example:

var AnimationComplete;

$('div').click(function() {
    $(this).addClass('green');
    AnimationComplete= false;
    console.log(AnimationComplete);
});

$("*").bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function() {
    AnimationComplete= true;
    alert('animate ended');
    console.log(AnimationComplete);    
    return false; /*Cancel any bubbling*/
});

, BAD *, [ s] . .

jsFiddle

, , , , "" AnimionComplete .

jsFiddle

3 : , .

+2

All Articles