Rapid repeated traversing within a div
<p>I have a number of divs, each of which contain an instance of a number of different items, each with their own unique classes and/or ids.</p>

<p>A lot of .js code applies to the elements within each of these parent divs, and my .js is getting bloated by the constant need to do things like:</p>

<pre><code>// Stuff like this occurs 15-20 times for similar but different actions
$(this).parent().nextAll('.target').eq(0).find('.toggle').slideToggle();
$(this).next('.alert').html('Success');
</code></pre>

<p>In the context of the <i>document</i>, I see why this code is necessary. However, I feel that if I were only able to redefine the reference point as being the parent div instead of the whole document, I could replace the convoluted code above with the MUCH easier:</p>

<pre><code>function keepingCodeWithinParentDiv(){
  $('.toggle').slideToggle();
  $('.alert').html('Success');
}
</code></pre>

<p>So, is there a way to say in Javascript: <code>for this part nothing exists outside this div</code>?</p>
