On 05/02/2007, at 12:37 PM, Alexandre Plennevaux wrote:
> hello,
>
> say i have a definition list:
>
> <dt>title </dt>
> <dd> this content blabla</dd>
> <dt>another title </dt>
> <dd> another content blabla</dd>
>
> i would like to have an event triggered on each dt that modifies
> its following dd, and only that one.
>
> i tried a few , but cannot get it to work correctly; it's either
> all of them or an erratic move. the closest i got is:
>
> jQuery(function($)
> {
> $("dt").click( function() {
>
> $("~ dd",this).slideToggle();
> });
> });
>
>
> can you tip me in the right direction?
>
> Thanks
>
> alex
>
Hi Alex, how about this?
jQuery(function($)
{
$("dt").click( function() {
$(this).next("dd").slideToggle();
});
});
Untested.
Joel Birch.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/