I am new to Jquery and need some help: I have a div, I want to click on it and roll down another div, but I want to click on it again and have it fold up, I know its easy but im stumped. Heres the code:
$(document).ready(function() {
$('#clickme').click(function() {
$('#book').slideDown('slow', function() {
// Animation complete.
});
});
});
As I mentioned in my comment, use .slideToggle(). Here’s a jsFiddle example.
jQuery:
HTML: