title: easing speed of blink for text in a jackpot game
body: <p>I am making a jackpot game with a selector very similar to <a href="https://www.youtube.com/watch?v=dKog2UlOfZw" rel="nofollow noreferrer">this one</a></p>
  
  <p>I have absolutely no idea where to start. My first thought was to use an array of randomly selected numbers sent from the server side to avoid cheating and animate those with jquery or css. </p>
  
  <p>Then i thought about useing just jquery since i know it better and having the blink interval be a recursive fucnction that returns the values for easing speed i want. (the values would be pretty much exactly like in the video, no more than 3-4 seconds).</p>
  
  <pre><code>$('.blink').blink(); // default is 500ms blink interval.
  $('.blink').blink(100); // causes a 100ms blink interval.
  </code></pre>
  
  <p>But now I am at a loss for where to get started since this has to be mobile friendly. What would you do?</p>
  
  <hr>
  
  <p>UPDATE</p>
  
  <pre><code>$( document ).ready(function() {
  
  var time = 0;
  var diff = 50;
  var minTime = 0;
  var maxTime = 7000;
  
  
  function easeInOutExpo(t, b, c, d) {
      t /= d;
      return c*t*t*t + b;
  };
  
  
  $("#clickme").click(function() {
      for (var i = 0, len = diff; i &lt;= len; i++) {
        (function(s) {
          setTimeout(function() {
              $('#book').html("Page " + s + " turned");
          }, time);
        })(i); //&lt;--------------i have no clue what this does------------
        time = easeInOutExpo(i, minTime, maxTime, diff);
      }
  });
  
  });//document ready
  </code></pre>
  
  <p>I've gotten the basic mechanic down, but when you click on it a second time instead of 50 it goes to 0. this is not good behavior as I am going to use these numbers to iterate through a randomly generated array.</p>
  
  <p>Can anyone explain this behaviour? <a href="https://jsfiddle.net/qhL2rr7q/2/" rel="nofollow noreferrer">I've included a JS fiddle here.</a> Thank you!</p>