Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Check to see if radio button is selected

$
0
0

I am trying to create a quiz in an e-learning module. There are multiple choice questions with the answers displayed next to radio buttons. When the correct radio button is selected I would like an element to appear on the screen. I've tried different codes for checking if a radio button is selected but no luck so far. This is my latest code:

 

sym.$('Text1').html('<form><input type="radio" name="sex" id="man" value="male">Male<br><br><input type="radio" name="sex" id="woman" value="female">Female</form>');

 

if ($('#man:checked').val() == 'true') {   

    sym.$('Ellipse').show();

}


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>