I have a form with a lot of radio buttons and a couple of text fields. So...
<input type="radio" name="pic" id="pic" value="val1">
<input type="radio" name="pic" id="pic" value="val2">
<input type="radio" name="pic" id="pic" value="val3">
<input type="text" name="email" id="email" value="">
<input type="text" name="comment" id="comment" value="">
and there's a link after the form that will open up a lightbox. I want the link to be enabled only if a radio button is selected and the two fields are filled out. Thanks a lot for your help.
then add
onchange="checklink()"
to your input fieldsEdit: fixed disabling as per @fehergeri comment
I think that this should work:
Edited to amend your code:
html:
jQuery:
JS Fiddle demo.