title: How to select rows from table with several classes in jquery?
body: <p>I have a table:</p>
  <pre><code>&lt;table&gt;
  &lt;tr class=&quot;someclass&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr class=&quot;anotherclass&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr class=&quot;newclass&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr class=&quot;anotherclass&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr class=&quot;anotherclass&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr class=&quot;someclass&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr class=&quot;someclass&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr class=&quot;newclass&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;tr class=&quot;newclass&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  <p>i want to add some css style (add class &quot;colored&quot;) to rows with classes &quot;someclass&quot; and &quot;anotherclass&quot;. I know how to do it for only one class:</p>
  <pre><code>$('table tr.someclass').addClass('colored');
  </code></pre>
  <p>But how can i select rows with 2 or more classes?</p>
  <p>Maybe somebody will answer about using commas, but what i can do if my selection is like:</p>
  <pre><code>$ ('table tr.someclass:odd:lt(5):not(tr:first-child)').addClass('colored');
  </code></pre>
  <p>I want to select first 5 rows (with classes &quot;someclass&quot; and &quot;anotherclass&quot; only!) except first one, then select only odd of them, and finally add a class &quot;colored&quot;.</p>