title: difference between toggleclass and addclass
body: <p>I am working with jquery and attempting to add a class to a table on the selection of that table row.</p>
  
  <p>I was initially using the following code - </p>
  
  <pre><code>$(this).parents("tr").toggleClass("over", this.clicked);            
  </code></pre>
  
  <p>For some reason, that wasn't working in <em>only some</em> instances where there was already a class assigned. 
  Before I went too crazy with any troubleshooting, I changed it to the following - </p>
  
  <pre><code>$(this).parents("tr").addClass("over", this.clicked);           
  </code></pre>
  
  <p>This new option appears to be working fine.</p>
  
  <p>My question is whether one option above is better than the other.....Should I be using toggleClass instead of addClass, or is addClass sufficient?</p>
  
  <p>thanks for any thoughts.</p>