Have you tried using .next() ? Something along these lines (untested):

$('dd.comments input[type="radio"]').toggle(
    function(){ $(this).next('dd.feedback').show(); },
    function(){ $(this).next('dd.feedback').hide(); }
});

- jason



On May 27, 3:57 pm, macgregor <[EMAIL PROTECTED]> wrote:
> I have a survey marked up with a definition list like so:
>
> <dl>
>         <dt>Question 1</dt>
>         <dd>Answer 1<input type="radio" /></dd>
>         <dd class="comments">Answer 2<input type="radio" /></dd>
>         <dd class="feedback">
>                 <textarea></textarea>
>         </dd>
>         <dt>Question 2</dt>
>         <dd>Answer 1<input type="radio" /></dd>
>         <dd>Answer 2<input type="radio" /></dd>
>         <dd class="comments">Answer 3<input type="radio" /></dd>
>         <dd class="feedback">
>                 <textarea></textarea>
>         </dd>
> </dl>
>
> Is there any way to select the dd elements for a particular dt? I
> would like to be able to show/hide the textarea when the radio button
> inside dd.comments is clicked/selected.

Reply via email to