Question

I have a click event handler where I want a hidden div to slide down. I have achieved this, but rather than using a toggle and have it slide up on the additional click, I would like it to slide down again.

So, rather than slide down, slide up I want it to slide down and then slide down again.

This is the code I am currently using, until I manage to achieve the effect/animation I want:

$(document).ready(function() {      
    $(".whereami").click(function() {
       $(".currentpage").slideToggle("slow");
    });
});
Was it helpful?

Solution

ok i have read ur question like 5 times now ((: and solved your problem;

here is demo

to keep up continuity animation, use this way;

  $(".whereami").click(function() {
      $(".currentpage").animate({'top':'+=100px'},600);//adds +100 on every click
  });                                          //and 600 for animation's duration
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top