Randomise quiz questions from xml file with javascript -


i created quiz in xml file. manage make hole code work properly. i'm stuck @ 1 point, how make quiz questions appear random? bellow can see 1 of question in javascript.

<!-- question 1 -->          <question id="q1" time="15" event="">        <box id="col1" position="relative" class="col-md-6" />      <box id="col2" position="relative" class="col-md-6" />        <text id="question1" position="relative" target="col1" x="0" margin-top="150" margin-bottom="40" anim="left" animtime="0.5"><![cdata[<p class="p_24">what's name?</p>]]></text>      <image id="fb1image" position="relative" target="col1" x="0" y="0" margin-bottom="30" anim="none" class="img-responsive"><![cdata[lib/assets/c1.jpg]]></image>  <!--option 1 -->  <option correct="true">  <text id="option1_1" position="relative" target="col1" x="match" width="100%" margin-bottom="5" anim="left" animtime="0.5" animdelay="0.5" event="optionover,selectandsubmit" class="optionbox"><![cdata[<p class="p_16 white">pontus</p>]]></text>  </option>  <!--option 2 -->  <option correct="false">  <text id="option1_2" position="relative" target="col1" x="match" width="100%" margin-bottom="5" anim="left" animtime="0.5" animdelay="0.6" event="optionover,selectandsubmit" class="optionbox"><![cdata[<p class="p_16 white">peter/bb</p>]]></text>  </option>  <!--/options -->  <!-- feedbacks -->  <fb id="pass" event="">    <box id="fb" position="relative" target="col2" margin-top="150" clear="both" anim="show" animtime="0.5">  <image id="passimage" position="relative" x="0" y="0" margin-bottom="30" anim="none" class="img-responsive"><![cdata[lib/assets/c1_correct.jpg]]></image>    <text id="txt1" position="relative" anim="none" margin-bottom="30"><![cdata[<p class="p_24">correct!</p><p>my name pontus.</p><p>good job!</p>]]></text>  <button id="nextqbtn" position="relative" width="150" margin-bottom="10" anim="none" event="btnover,loadnextquestion"><![cdata[next]]></button>    <text id="bottompad" position="relative" anim="none"><![cdata[<p>&nbsp;</p>]]></text>  </box>  </fb>  <fb id="fail" event="">  <box id="fb" position="relative" target="col2" margin-top="150" clear="both" anim="show" animtime="0.5">  <image id="failimage" position="relative" x="0" y="0" margin-bottom="30" anim="none" class="img-responsive"><![cdata[lib/assets/c1_correct.jpg]]></image>    <text id="txt1" position="relative" anim="none" margin-bottom="30"><![cdata[<p class="p_24">wrong!</p><p>my name pontus.</p><p>be careful!</p>]]></text>  <button id="nextqbtn" position="relative" width="150" margin-bottom="10" anim="none" event="btnover,loadnextquestion"><![cdata[next]]></button>    <text id="bottompad" position="relative" anim="none"><![cdata[<p>&nbsp;</p>]]></text>  </box>  </fb>  </question>


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -