title: jquery removing a class (if it exists and adding a new class)
body: <p>I'm trying use jquery to remove a class from an element (not knowing ahead of time if it exists) and add a new element to replace it.</p>
  
  <p>Would this be the best way (I'm skepticle because its not checking to see if the class exists before removing it):</p>
  
  <pre><code>$(elem).removeClass(oldClass).addClass(newClass);
  </code></pre>
  
  <p>thanks</p>