I would like the div to fold down when clicked on and then fold back up when clicked again.
Here is my jQuery code:
$(".fold_reply").click(function() {
if ($('.reply').css('display') === 'none') {
$(".reply").show("fold", {}, 500);
}
else {
$(".reply").hide("fold", {}, 500);
}
});
The div I want to fold starts with display set to none.
In my reply tag: < div class="reply" style="display:none; " > initially, the reply is hidden
When I click, the div folds down but doesn't fold back up on subsequent clicks.
Can you please assist me with this issue?