title: how to create a logic to spin the 3 images when the SPIN NOW button is clicked
body: <p>logic to spin the 3 images when the SPIN NOW button is clicked.</p>
  
  <p>After the spin is finished, user earns either 200 points or 500 points depending on the sequence of the result of the spin.</p>
  
  <p>1) When All the 3 images are same, user gets 500 points which he can use to redeem products.
  2) When At least 2 images are same, user gets 200 points which he can use to redeem products.
  ​3) When none is the same show failure message.​ </p>
  
  <p>following are the code of change images.</p>
  
  <pre><code>&lt;script&gt;
  var randomImage = new Array();
  randomImage[0] = "images/01.jpg";
  randomImage[1] = "images/02.jpg";
  randomImage[2] = "images/03.jpg";
  $(function() {
      $('.click').click(function(e) {
          e.preventDefault();
          var number = Math.floor(Math.random() * randomImage.length);
  
          $("#bg").html('&lt;img width="250px" height="250px" src="' + randomImage[number] + '" /&gt;');
  
      });
      $('.click').click(function(e) {
          e.preventDefault();
          var number = Math.floor(Math.random() * randomImage.length);
          $("#bga").html('&lt;img width="250px" height="250px" src="' + randomImage[number] + '" /&gt;');
      });
      $('.click').click(function(e) {
          e.preventDefault();
          var number = Math.floor(Math.random() * randomImage.length);
          $("#bgab").html('&lt;img width="250px" height="250px" src="' + randomImage[number] + '" /&gt;');
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>User Should be able to play only thrice. When he plays 4th time, he should be asked to wait for 30 mins to play again. </p>