jQuery animate Toggle
- by danit
Here is my code so far:
$(document).ready(function(){
$("#slider").click(function() {
$("#insight").animate({ top: "25px",}, 300, function() {
$("#insight").animate({ top: "89px",}, 300);
});
});
});
I want this to act like .toggle(), where by on click #div1 slides up to top:25px and then stops, but when clicked again slides down to top:89px.
Can anyone expand the function above to achieve this?