JQuery slideUp div if it's already folded?

I have a simple question about jQuery slideDown, SlideUp. I use slideDown to shift the div to click, for example

$("#box").slideDown("slow");

How can I do this so that if #box is already copied, it should move up by clicking again? Thank.

+3
source share
1 answer

use . slideToggle () instead

$("#box").slideToggle("slow");

+6
source

Source: https://habr.com/ru/post/1783043/


All Articles