I'm trying to only show a child div when the parent div's text is shown, instead of all the other divs with the same name. Imagine four div's with classes of "lead" and within those leads, there is a normaldiv child. Rather than open all the childs in other lead divs, I only want the one child within each lead.
Example HTML:
<div class="lead"><div class="normaldiv">1</div></div>
<div class="lead"><div class="normaldiv">2</div></div>
<div class="lead"><div class="normaldiv">3</div></div>
<div class="lead"><div class="normaldiv">4</div></div>
jQuery - this expands all normal divs
$(".lead").click(function() {
$(".normaldiv").slideToggle("slow");
});
Tested:
$(this).parent().children(".normaldiv").slideToggle("slow");
The tested one I thought would grab all the children within the parent div and only expand those on a click. However, nothing shows up on a click event.