I have a html structure like this:
<div class="container">
<dt class="odd">...</dt>
<dd class="odd">...</dd>
<dt class="even">...</dt>
<dd class="even">...</dd>
<dt class="odd">...</dt>
<dd class="odd">...</dd>
<dt class="even">...</dt>
<dd class="even">...</dd>
</div>
the sturcture above have dt with class odd and dt with class even, what i want is when i clik the dt with class odd the next dd with class odd will show or hide, but the problem is my on click function for dd is not firing at all, here's the code:
$( "dt.odd" ).click(function() {
alert('odd');
$(this).parent().next('dd.odd').show();
});
$('dt').clickwithout odd it firing the click function