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