Menu
Is there an easy way to do the following? Say I have 4 divs on a page with clickable images in each one. When I click on one of them I want the div style to change. If I click on another one after that I want the clicked div to change style and the previously clicked div to return back to it’s old style (or change to a new style either way). How do I keep track of what id was previously clicked so I can change the style back?
I’m sure you can use and array or something, but I don’t know the cleanest way to code this.
Thanks!