How to bulk select <td> using jQuery
<p>I am having a HTML table with many rows. I have seven columns in it. Each cell (<code>&lt;td&gt;</code>) in the table has an ID attribute with grid[x][y] with x and y representing columns and rows respectively.</p>

<p>Example <code>&lt;td&gt;</code>s are</p>

<pre><code>&lt;td id="grid[2][2]" class="available"...&gt; -- This indicates 3rd column 3rd row 
&lt;td id="grid[2][4]" class="unavailable"...&gt; -- This indicates 3rd column 5th row 
</code></pre>

<p>and so on.</p>

<p>Now I need to write a query which gives me the count of columns with class="available" or class="unavailable". How to write it in jQuery?</p>

<p>So, for getting first column which has class="available" it would be something like this,</p>

<pre><code>(id = grid[0]* and class == "available").size
</code></pre>

<p>Please help me transform the above (a stupid query) into a meaningful jQuery.</p>
