title: JQuery - remove selected class when using "Attribute starts with" selector?
body: <p>Working with auto-generated html code, with variable classnames: <code>table-col-44, table-col-19, table-col-121</code> etc.</p>
  
  <p>I've got a loop that's going through and selecting these variable classes using <a href="http://api.jquery.com/attribute-starts-with-selector/" rel="nofollow">this jQuery selector functionality</a>:</p>
  
  <pre><code>for(r in replace){
      var targ = replace[r];
      $("[class^='"+targ+"']").each(function(){
          ...
      })
  }
  </code></pre>
  
  <p>The problem is, once I've selected the classes I want to scrub, I can't find a way to target them to remove them. Often these are <code>&lt;p&gt;</code> and <code>&lt;td&gt;</code> tags that have other classes that need to be preserved, so I can't just wipe the class attribute altogether. Is there a way to pass the matched class as an argument to the each() function? Or perhaps there's some kind of <code>$(this).removeClass([selected])</code> keyword that comes with jQuery? Totally stumped here. Thanks for the help!</p>