Using jQuery to work with next first element that is not a sibling
<p>What I need to do is get the next element which isn't of the same type as the current. I'm not sure if that makes any sense. As far as I know, next() in jQuery only gets the next sibling. </p>

<p>This is what I have:</p>

<pre><code>&lt;tr&gt;
   &lt;td&gt;
      &lt;a&gt;Link&lt;/a&gt;
   &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;
      &lt;div class="A"&gt;
         &lt;div class="B"&gt;...&lt;/div&gt;
         &lt;div class="B"&gt;...&lt;/div&gt;
         &lt;div class="B"&gt;...&lt;/div&gt;
      &lt;/div&gt;
   &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;
      &lt;a&gt;Link&lt;/a&gt;
   &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
   &lt;td&gt;
      &lt;div class="A"&gt;
         &lt;div class="B"&gt;...&lt;/div&gt;
         &lt;div class="B"&gt;...&lt;/div&gt;
         &lt;div class="B"&gt;...&lt;/div&gt;
      &lt;/div&gt;
   &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>After clicking the link, I'd like to do something with the div.B's within div.A. But only the first div.A right after the link, not the ones on the rest of the page. To be more specific, what I'm trying to do is set this up so that clicking the link will show or hide the div.B's.</p>

<p>Is this possible or feasible? Will this being in a table be a problem?</p>

<p>I'm not a jQuery expert so I'm just kinda messing around with it right now.</p>
