how to switch class between two elements using jQuery
<p>I think this question might already been asked, but I can't find any answer working nor questions that reflect my problem. My problem is I currently have 2 <code>&lt;div&gt;</code>'s and I would like them to switch class after a <code>onClick</code> event.<br/>
For example, when I click on a div, I'd like it to have a class called <code>isSelected</code> and if the 2nd div have the class, I'd like to remove it. I don't simply want the clicked div to toggle <code>isSelected</code>, I'd want the other div to 'loose' it's <code>isSelected</code> class.</p>