jQuery-How to improve this code
<p>I have one jQuery code and need some help from u guys to improve performance.
HTML:</p>

<pre><code>           &lt;div class="mydiv"&gt;
               &lt;div class="indiv"&gt;
                 &lt;span&gt;
                  myspan
                    &lt;/span&gt;
               &lt;a href="#"&gt;
                 a1
                 &lt;/a&gt;
              &lt;a href="#"&gt;
                a2
                 &lt;/a&gt;
                &lt;/div&gt;
                &lt;table &gt;
               ..................
             &lt;/table&gt;
               &lt;/div&gt;
</code></pre>

<p>Now I wantto know the following.
1.Now for working with a particular range of tr, I am coding like</p>

<pre><code> var $myrows = $(".mydiv table tr").slice(index);
  $($myrows , this).jQueryFunction()
</code></pre>

<p>The code is working fine, but I think $(".mydiv table tr") will make the browser traverse total DOM, so should I go for 
 $(".mydiv table tr",this).jQueryfunction() //I think this will improve performance,instead of using var$myrows.</p>

<p>I think 2 nd one  is good.</p>

<p>2.$(".mydiv .indiv a",this).click(function(event)
this click is not working , if I remove this it will start working.why?</p>

<p>3.I have to select one specific tr, for that I am using </p>

<p>$(".mydiv table tr:nth-child(that specific child)")
Any better way of doing this?Also in this case it will traverse the DOM.
Thanks.</p>
