views:

963

answers:

2

I'm trying to move some elements on the page, and during the time the animation occurs, I want to have "overflow:hidden" applied to an elemnt, and "overflow" back to "auto" once the animation is completed.

I know jQuery has an utility function that determines whether some element is being animated but I can't find it anywhere in the docs

A: 

Use callbacks for this task.

Mork0075
+4  A: 
if( $(elem).is(':animated') ) {...}

More info: http://docs.jquery.com/Selectors/animated


Or:

$(elem)
    .css('overflow' ,'hidden')
    .animate({/*options*/}, function(){
        // Callback function
        $(this).css('overflow', 'auto');
    };
J-P
yes that was it, thanks. how could I miss it? damn, I'm getting old