I need jQuery to know that the element on my page is already switched or not.
I have a menu with XXX items.
When I click on an element, I use: $("#elementXX").slideToggle("slow"); (XX is the number)
If I click on another item, I need to know if the item is already switched, and I need to close this item before slideToggle is my new item.
How can i do this? I cannot check id by id like # element1, # element2, # element3 etc.
Thanks!
source share