Hi, Loic...

Check out this page about .selected.  The example given
when you follow the link is about a select input, but it seems
that it could apply to radio inputs, as well.

Rick

http://docs.jquery.com/Selectors/selected



> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of LoicDuros
> Sent: Saturday, January 24, 2009 3:02 PM
> To: jQuery (English)
> Subject: [jQuery] .change alternative
> 
> 
> Hi,
> 
> I'm using a .change function to find out whether a radio button or not
> is selected by the user. I then show() or hide() other fields
> according to which radio button has been selected. Now, the problem
> arises when someone clicks on the reload button of the browser, or if
> some php validation returns to the form, some fields remain hidden
> because the .change function has not been triggered. Is there a way to
> detect which radio button is selected - before any user input? I'm
> thinking of something like: if radio button with id is selected, then
> show / hide these other fields.
> 
> Is there something like .selected? I could use and check from the
> value?
> 
> Thanks for your help!

Reply via email to