I think this should be a pretty common jquery function but I just couldn’t find anything about it.
say I have 10 divs and each div trigger an event when clicked. So when I cilck a div, jquery adds a class, say “clicked” to the div. But how can I set it so when I click another div, it removes the previous div class “clicked” and gives it to the div that I just clicked?
Thanks!!!
or:
You can try it here.