title: jQuery .removeClass() not working
body: <p>I need to remove a CSS class from an text field since I want to change its background color. I need to change the color back later, so I have to add and remove classes to the field, depending on some data.</p>
  
  <p><code>.addClass</code> is working totally fine. The problem is that the original class is above the added, so the changes are not shown, but the class is added properly. I now try to remove the class which is above the added - but I cant remove any classes from my elements. Why is that? What am I doing wrong? Here's the code:</p>
  
  <pre><code>if(i.stadt=="T") {
      $("#stadtInput").removeClass("ui-input-text input");
      $("#stadtInput").removeClass("ui-input-search input");
      $("#stadtInput").addClass( 'textboxRight' );
  } else {
      $("#stadtInput").addClass( 'textboxWrong' );
  }
  </code></pre>
  
  <p>If I inspect the elements with Webdev-Tools of browser I can see that the <code>textboxRight</code>/<code>textboxWrong</code> class is added, but no class is removed. I already tried to remove all classes by <code>.removeClass()</code>, but that doesn't work either..</p>