title: jQuery - remove a class that is in an array
body: <p>I have a div object </p>
  
  <pre><code>&lt;div class="class1 classA classB class2"&gt; content &lt;/div&gt;
  </code></pre>
  
  <p>and some buttons</p>
  
  <pre><code>&lt;button id="numbers"&gt;clickme N &lt;/button&gt;
  
  &lt;button id="alphas"&gt;clickme A &lt;/button&gt;
  </code></pre>
  
  <p>The code should do this function:</p>
  
  <pre><code>&lt;script&gt;
      var classesN = [class1, class2, class3];
      var classesAlpha = [classA, classB, classC];
  
      $('#alphas').click(function() {
         $('div').removeClass(all classes that are in the classesAlpha array);
      });
      $('#numbers').click(function() {
         $('div').removeClass(all classes that are in the classesN array);
      })
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks for any suggestion and I hope you like the question :)</p>