Advertisement
orksnork

Untitled

Jul 15th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.23 KB | None | 0 0
  1. var current = question.number;
  2. var collapsed = 0;
  3. var variable = ""
  4. var timeout = "300"
  5. var fadespeed = "200"
  6. var rolls = 0
  7. $(document).ready(function() {
  8.  
  9.     randomQuestion();
  10.     writeQueryVariable();
  11.     writeCount();
  12.     writeRolls();
  13.    
  14.     $('body').on('click', '#flip-1', function(){
  15.         fadeQuestion();
  16.         $('#answer-1').fadeIn(fadespeed);
  17.         setTimeout(writeQuestion, timeout);
  18.     });
  19.    
  20.     $('body').on('click', '#flip-2', function(){
  21.         fadeQuestion();
  22.         $('#answer-2').fadeIn(fadespeed);
  23.         setTimeout(writeQuestion, timeout);
  24.     });
  25.    
  26.     $('body').on('click', '.flop', function(){
  27.         $('.answer').fadeOut(fadespeed);
  28.         $('#question').fadeIn(fadespeed, function(){
  29.             writeAnswer();
  30.             pushScript();
  31.             writeCount();
  32.         });
  33.     });
  34.    
  35.     $('body').on('click', '.btn-submit', function() {
  36.         panelFlip();
  37.     });
  38.    
  39.     $('body').on('click', '#closelink', function(){
  40.         formX();
  41.     });
  42.            
  43.     if (variable == "") {
  44.         mainLoad();
  45.         htmlVariable("nothing");
  46.         }
  47.     else if (variable != ""){
  48.         numberofquestions = questions.length;
  49.         if (variable <= numberofquestions) {
  50.             question = questions[variable]
  51.             mainLoad();
  52.             htmlVariable("in bounds");
  53.             randomQuestion();
  54.             }
  55.         else {
  56.             mainLoad();
  57.             htmlVariable("outta bounds");
  58.         }
  59.     }
  60.    
  61. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement