On Fri, Nov 14, 2008 at 12:51 PM, John Keith Hohm <[EMAIL PROTECTED]> wrote:

>
> But this does not work for radio or checkbox inputs. Given this HTML:
>
> <input type="radio" name="ordinal" value="1">First</input>
> <input type="radio" name="ordinal" value="2">Second</input>
>
> code like this:
>
> $("[EMAIL PROTECTED]'ordinal']").val("2");


That selector matches both inputs (they both have a name attribute with a
value of ordinal), so it's going to change the value of both of them. Maybe
you want to use value=2 in the attribute selector and call .attr("checked",
"checked")?

- Richard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to