title: Jquery Generate random number pass to if
body: <p>I'm trying to create a random number in Jquery I'm not sure if I need to store it to do the next part maybe you guys could help me out on that first off my random number generator;</p>
  
  <pre><code>    $( "#arrowleftup" ).click(function() {
      var number = 1 + Math.floor(Math.random() * 10);
      $('#storenumber').text(number);
      });
  </code></pre>
  
  <p>I want to generate a random number when my Img with the id "arrowleftup" is clicked, I then want to pass my number into this - </p>
  
  <pre><code>If ('#storenumber' == 8=&gt;){
  $('.battle').show();
  } else {
  die
  };
  </code></pre>
  
  <p>So that if the number was 8 or higher it would show a hidden div, can anyone spot the error in my code? Also do I need to store the value to pass it into the if statement</p>
  
  <p>JSFiddle - <a href="http://jsfiddle.net/7t59E/" rel="nofollow">http://jsfiddle.net/7t59E/</a></p>
  
  <p>thanks!</p>