Created
August 10, 2018 20:01
-
-
Save NickDeckerDevs/fc8b933b594d6173b6969dd105d81b1e to your computer and use it in GitHub Desktop.
miller welidng form stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function count(answer) { | |
| var count = 0; | |
| $('#lro-quiz-1 input[type="radio"]').each(function() { | |
| if ($(this).is(':checked') && $(this).val() == answer) { | |
| count = count + 1; | |
| } | |
| }); | |
| return count; | |
| } | |
| $('.question input[type="radio"]').on('change', function() { | |
| $('input.lro1_total_yes_answers').val(count('Yes')); | |
| $('input.lro1_total_no_answers').val(count('No')); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment