title: jQuery Simple Quiz not working
body: <p>I am just learning Javascript and jQuery. I have made a simple quiz that is essentially broken, but I have narrowed the problem down to my code. I am certain that all the ids are linked, and that jQuery is connected correctly to the CDN. I know I could ask the questions one after another, but imo that is sloppy coding. </p>
  
  <p>From <a href="http://pastebin.com/54JQwhAg" rel="nofollow">http://pastebin.com/54JQwhAg</a></p>
  
  <pre><code>HTML: &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="Utf-8"&gt;
          &lt;title&gt;The quiz to end all quizes&lt;/title&gt;
          &lt;link rel="stylesheet" href="style.css"&gt;
          &lt;script src="libs/jquery-1.11.0.min.js"&gt;&lt;/script&gt;
          &lt;script src="script.js"&gt;&lt;/script&gt;
          &lt;link rel="shortcut icon" href="favicon.ico" type="image/x-icon"&gt;
          &lt;link rel="icon" href="favicon.ico" type="image/x-icon"&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="main"&gt;
              &lt;div id="header"&gt;
                  &lt;img src="images/logo.png"&gt;
                  &lt;h2&gt;This page is an experiment to see if I can use JavaScript and jQuery to make a quiz game.&lt;/h2&gt;
                  &lt;p&gt;Please answer with no punctuation.&lt;/p&gt;
                  &lt;p id="show"&gt;Click here to show answers.&lt;/p&gt;
                  &lt;img id="start" src="images/clickme.png"&gt;
              &lt;/div&gt;
              &lt;div id="answers"&gt;
                  &lt;!-- CHEATER!!! --&gt;
                  &lt;p&gt;&lt;span id="ans1"&gt;&lt;/span&gt;Q: Who was the first African-American major league baseball player? A: Jackie Robinson&lt;/p&gt;
                  &lt;p&gt;&lt;span id="ans2"&gt;&lt;/span&gt;Q: Who was the second U.S. President? A: John Adams&lt;/p&gt;
                  &lt;p&gt;&lt;span id="ans3"&gt;&lt;/span&gt;Q: Where did the general keep his armies? A: In his sleevies&lt;/p&gt;
                  &lt;p&gt;&lt;span id="ans4"&gt;&lt;/span&gt;Q: Why did the chicken cross the road? A: To get to the other side&lt;/p&gt;
                  &lt;p&gt;&lt;span id="ans5"&gt;&lt;/span&gt;Q: Why did the scarecrow get a promotion? A: He was outstanding in his field&lt;/p&gt;
                  &lt;h2 id="numright"&gt;&lt;/h2&gt;
                  &lt;p id="hide"&gt;Click here to hide answers.&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  
  Javascript:
  $(document).ready(function() {
      var score;
      var questions = [
                      "Who was the first African-American major league baseball player?", 
                      "Who was the second U.S. President?",
                      "Where did the general keep his armies?",
                      "Why did the chicken cross the road?",
                      "Why did the scarecrow get a promotion?"
                      ];
      var answers = [
                      "jackie robinson",
                      "john adams",
                      "in his sleevies",
                      "to get to the other side",
                      "He was outstanding in his field"
                      ];
      $('#answers').hide() // hide answers
      $('#start').click(function() {
          for (num=0; num&lt;5, num++){
              var ans = prompt(questions[num], "Enter Answer Here")
              if (ans == answers[num])
                  score++
              } // end if
          } // end for
          $('#answers').show() // show answers
          $('#show').hide() // hide show
          $('#numright').write('You got ' + score + '/5')
      }); // end click
      $("#show").click(function() {
          $('#answers').show() // show answers
          $('#show').hide() // hide show button
      }); // end click
      $("#hide").click(function() {
          $('#answers').hide() // hide answers
          $('#show').show() // show show button
      }); // end click    
  }); // end ready
  </code></pre>
  
  <p>Basically, the parts that should be hidden dont load on start, and when the image that start the quiz is clicked, nothing happens. When I have tried to narrow down the problem to a line of code, parts of code randomly work and then not work, with no apparent correlation.</p>