title: Remove class using jQuery
body: <p>Morning,</p>
  
  <p>Is there a wildcard i can use in jQuery which would remove a class from an element?</p>
  
  <p>I am applying new classes to my info message box, if a users click it once, then clicks it again it is adding the new class, but retains the existing class.</p>
  
  <p>I need to remove the previous class, then add the new class for styling. Any ideas?</p>
  
  <pre><code> &lt;div id="infoMsg" style="display: block; " class="er-green er-red"&gt;All submitted feeds are complete.&lt;/div&gt;
  </code></pre>
  
  <p>As you can see the original class was er-green, it has then added er-red. </p>