JQuery: I get an error I cannot define
<p>When I do this:</p>

<pre><code>var rows = $('#_table&gt;tbody&gt;tr').show();
rows.find('td:nth-child(1):not(:contains("'+typed_val+'"))').parent().hide();
</code></pre>

<p>It works.</p>

<p>However,</p>

<p>When I do this:</p>

<pre><code>col_pos=1
var rows = $('#_table&gt;tbody&gt;tr').show();
rows.find('td:nth-child('+col_pos+'):not(:contains("'+typed_val+'"))').parent().hide();
</code></pre>

<p>It does not work.</p>

<p>Some reasons why this may be happening? </p>
