title: Jquery Countdown Timer no reset on page refresh?
body: <p>I have a piece of code that works flawlessly. When a button is pressed the timer counts down until it can be pressed again. </p>
  
  <p><strong>The problem</strong>: When the page is refreshed it will be reset and they will have to click it all over again before the count down happens again. </p>
  
  <p><strong>The Goal</strong>: The timer to start back at whatever time they have left. </p>
  
  <p>My application is <code>PHP</code> and <code>MySQL</code> if that would work best but here is the code I'm working with. </p>
  
  <p>Does anyone know how I'd get the functionality I'm looking for?</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$('.trigger').on('click', function(e) {
      $(this).html('show')
      $('.show').slideUp('medium');
      var count = 10,
          counter = setInterval(timer, 1000);
  
      function timer() {
          count--;
          if (count &lt;= 0) {
              clearInterval(counter);
              $('.trigger').html('hide');
              $('.show').slideDown('medium');
              return;
          }
          console.log(count);
          $('.timer').html(count);
      }
  });
  </code></pre>