Okay, so i have:
<div class="catergory">
<div class="title">CATEGORY TITLE</div>
<div class="listing">
CODE FOR LISTINGS
</div>
</div>
What i am trying to do, is have it so when you click the CATEGORY TITLE, the LISTINGS div slides down, My problem is, is how do i select that div when i have put a click event on CATEGORY TITLE
My JQuery code is:
$('.title').click(function(){
$('.category > .listings',this).toggleSlide('slow');
});
Now, I know the problem is something with my way of selecting the correct element..
any ideas?
Thanks
Neil
$(‘.title’).click(function(){
$(this).next(‘.listing’).slideToggle(‘slow’);
});