[jQuery] Re: Correct Selector syntax

2008-04-15 Thread Up-Works
Thank you Karl - worked like a charm On Apr 13, 1:13 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi there, > > Probably the easiest way -- provided that the group of inputs is > always contained within a paragraph -- is to do this: > > $(this).parents('p').find('input.required.spell').val(newT

[jQuery] Re: Correct Selector syntax

2008-04-15 Thread Up-Works
Thank you Karl - worked like a charm! What a great surprise to see the author of two great jQuery books, 'jQuery Reference Guide' and 'Learning jQuery' to be the respondent.

[jQuery] Re: Correct Selector syntax

2008-04-15 Thread Ralf B
Hello Michael, this works for me: $(document).ready(function() { $("input[name='spellQ']").bind("change",function() { if($(this).attr("value") == 'Y') { $("input[name='playerName-0']").val($(".correctWord").html()); } else { alert('User selecte

[jQuery] Re: Correct Selector syntax

2008-04-13 Thread Karl Swedberg
Hi there, Probably the easiest way -- provided that the group of inputs is always contained within a paragraph -- is to do this: $(this).parents('p').find('input.required.spell').val(newText); The .prev() method selects the immediately previous sibling element. Your radio buttons have no