[jQuery] Toggling
[jQuery] Toggling
Hi everyone I've html code:
<a href="..." class="parent">Something</a>
<div class="sub">Something</div>
<a href="...">Something</a>
<a href="...">Something</a>
<a href="..." class="parent">Something</a>
<div class="sub">Something</div>
<a href="...">Something</a>
and jquery code:
$(document).ready(function() {
$(".sub").hide();
$(".parent").click(function() {
$(".sub").toggle(400);
return false;
});
});
everything is ok until there is more then 1 link with parent class, when I click on link with parent class all divs with sub class slidingDown :/, what I should do? I want different behaviour: when I click on parent link only the nearest sub should slideDown.
Thanks in advance for help
Tomek
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/