code not working when checking table row count
<p>I'm trying to count the number of rows in a table of search results when the user presses the search button.  I am doing this, so that the table is cleared of previous search results if any are present.</p>

<p>However, the code doesn't work.  Nothing happens when the user presses search.  If I remove or comment out the code, then it works fine.  </p>

<p>Here is my code that is causing issues:</p>

<pre><code>            var rowCount = $(this + " tr").length;
            if (rowCount &gt; 1) {
                alert("true");
                $(this + " tr").remove();
            }
            ...go on to populate table with search results....
</code></pre>

<p>thanks</p>
