Finding next element of a specific class inside a parent jQuery
<p>I have the following:</p>

<pre><code>&lt;div class="container"&gt;
Test 1
&lt;div class="child"&gt;Testing&lt;/div&gt;
&lt;/div&gt;

&lt;div class="container"&gt;
Test 2
&lt;div class="child"&gt;Testing&lt;/div&gt;
&lt;/div&gt;

&lt;div class="container"&gt;
Test 3
&lt;div class="child"&gt;Testing&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>I wish to have the child div inside the container thats hovered over to show and hide when the mouse has left the container.</p>

<p>I do currently have:</p>

<pre><code>        $('.container').hover(
            function () {
                $(this).next('.child').show();
            },
            function () {
                $(this).next('.child').hide();
            }
        );
</code></pre>

<p>However it does not seem to work.
Any advice appreciated, thanks.</p>
