Need help with jQuery hide/show
<p>I'm using jQuery to show and hide elements upon user interaction. The following code works fine:</p>

<pre><code>&lt;script type="text/javascript"&gt;

$(document).ready(function () {
    $('.c').hide();
    $('.b').click(function() {
    var t = $(this);
    t.parent().find('.c').show();               
    });
});
&lt;/script&gt;

&lt;div class="a"&gt;
    &lt;a href="#" class="b"&gt;Show&lt;/a&gt;
    &lt;div class="c"&gt;This is hidden text&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>But when i put the link inside a div tag the code does not work. I couldn't figure out the problem. So I'm expecting some help.</p>

<pre><code>&lt;script type="text/javascript"&gt;

$(document).ready(function () {
    $('.c').hide();
    $('.b').click(function() {
    var t = $(this);
    t.parent().find('.c').show();               
    });
});
&lt;/script&gt;

&lt;div class="a"&gt;
    &lt;div class="d"&gt;&lt;a href="#" class="b"&gt;Show&lt;/a&gt;&lt;/div&gt; //if i place it inside div it doesn't work
    &lt;div class="c"&gt;This is hidden text&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Can anyone point out why it's not working??</p>
