When i click on a button, i want to remove a class and replace with by other one. I have the following html content :
<div class="mainDiv-34">
<div class="row one red"></div>
<div class="row two red"></div>
<div class="row three red"></div>
</div>
What i want to do is to replace the class="row two red" by class="row two green", but the row two green is addded next to my mainDiv-34 instead ! Why ?
Here's my JS :
$('.mainDiv-34').removeClass("row two red").addClass("row two green");
Thanks
