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!