title: Input Javascript countdown timer minutes and seconds?
body: <p>I'm working on a simple countdown timer using Javascript/jQuery.</p>
  
  <p>Basically, I can enter the amount of minutes in the input field and it will convert it to minutes and seconds and starts the countdown.</p>
  
  <p>so, if i enter <strong>30</strong>, it will start the countdown from <strong>29</strong> in this format: <code>29:59</code></p>
  
  <p>What I need to do is to be able to enter the minutes and seconds in the input field and it should countdown properly but I have no idea how to do this.</p>
  
  <p>for example, I want to enter <code>26:15</code> and the countdown should start from that time.</p>
  
  <p>this is my entire code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;h1&gt;Enter minutes you want to work &lt;/h1&gt;&lt;p&gt;0:00&lt;/p&gt;
  &lt;input id="request" type="text" value="&lt;?php echo $end_time; ?&gt;"&gt;
  
  &lt;input id="time" type="text" value=""&gt;
  &lt;a href="#" class="click"&gt;Click here&lt;/a&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>&lt;script&gt;
  $('.click').click(function () {
      var rawAmount = $('#request').val();
      var cleanAmount = parseInt(rawAmount);
      var totalAmount = cleanAmount * 60;
       $('#request').val(" ");
  
      var loop, theFunction = function () {
  
          totalAmount--;
  
          if (totalAmount == 0) {
  
              clearInterval(loop);
          }
          var minutes = parseInt(totalAmount/60);
          var seconds = parseInt(totalAmount%60);
  
          if(seconds &lt; 10)
              seconds = "0"+seconds;
          $('p').text(minutes + ":" + seconds);
          $('#time').val(minutes + ":" + seconds);
      };
  
      var loop  = setInterval(theFunction, 1000);
  
  })
  &lt;/script&gt;
  </code></pre>
  
  <p>could someone please advise on this issue?</p>
  
  <p><strong>EDIT:</strong> <a href="http://jsfiddle.net/71nab0b4/1/" rel="nofollow">http://jsfiddle.net/71nab0b4/1/</a></p>