Created
January 14, 2015 04:13
-
-
Save dangkhoasdc/0511ebeaa335812fc937 to your computer and use it in GitHub Desktop.
This file contains 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
jQuery('.question-rankings').each(function(){ var choices = $(this).find('input'); | |
var index = Math.floor(Math.random() * 3 + 1) + 1; | |
choices.get(index).checked = true; | |
}); | |
jQuery('.question-answers').each(function(){ | |
var choices = $(this).find('input'); | |
var index = Math.floor(Math.random() * 2 + 2); | |
choices.get(index).checked = true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment