I have a question and answer section of my site, where the user is asked 6 questions of out 40 possible questions. There are set answers for each one, but there isn't a correct answer. How do I randomize this in Javascript so that the same questions aren't always asked? I know it can be done with an array for the question and answers but don't know how to randomize them then for each page. This is my html code:
<h2>What is the weather like today?</h2>
<div class="answers">
<div class="answers-left">
<div class="answer1" tabIndex="1">Sunny</div>
<div class="answer2" tabIndex="2">Raining</div>
</div>
<div class="answers-right">
<div class="answer3" tabIndex="3">Cloudy</div>
<div class="answer4" tabIndex="4">Windy</div>
</div>
<div class="clear"></div>
</div>
<div class="next-button">
<a class="ui-btn" href="question-2.html" rel="external">Next</a>
</div>
As you can see, the user will select an answer and then click next to go to the next question. I only want one question to show at a time. Any help will be greatly appreciated!