match all elements by class except undefined
<p>Having table</p>

<pre><code> &lt;table&gt;
  &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td class="foo"&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td class="bar"&gt;&lt;/td&gt;&lt;/tr&gt;
 &lt;/table&gt;
</code></pre>

<p><strong>How to get all <code>td</code> elements having any class set?</strong></p>

<p>While trying </p>

<pre><code>$.each($("td:not(undefined)"),function(i,v){ ...
</code></pre>

<p>i still get <code>undefined</code> class in result</p>
