0

i using show in jquery with specific time

$('#main_div').hide();
$('#main_div').show(3000);

is their any jquery selector to detect show animation is currntly running. is it possible???

Arunkumar
  • 184
  • 1
  • 1
  • 10
  • I think this is what you are asking: http://stackoverflow.com/questions/724911/how-do-i-find-out-with-jquery-if-an-element-is-being-animated – George Apr 15 '13 at 03:39

2 Answers2

1

You can detect whether an animation is running by :animated selector, but it's not possible to decide which animation is running

otakustay
  • 11,817
  • 4
  • 39
  • 43
1

you could check:

if( $("#main_div").is(':animated') ) {
   ...
}

See: animated

Sudhir Bastakoti
  • 99,167
  • 15
  • 158
  • 162