How can I change a div class name when clicking on it? Eg:
<
That's because there is no code to do so. Add a little check. I also added some semicolons. I wonder if your script would even work the first time.