title: Problems with clearTimeout
body: <p>I have the following method when one of my div is being clicked:</p>
  
  <pre><code>   current_money = parseInt($(this).find('.text-white').text());
     var  current_category_id = $(this).find('.category_id').val();
     game.getQuestion(current_category_id, current_money);
     game.selected_question = $(this);
      var result = 15;
      var seconds = 15;
       check = function(){
          if(seconds &lt; 0)
          {
              checkAnswer(-1, 0, null);
          }
          else
          {
  
              var percentage = Math.round((seconds / result) * 100);
              $('#countDownChart').data('easyPieChart').update(percentage);
              $('#time').text(seconds);
              seconds--;
  
              setTimeout(check, 1700); // check again in a second
          }
      }
  
      check();
  </code></pre>
  
  <p>This shows a popup.</p>
  
  <p>When an element in the popup is clicked it calls the following method:</p>
  
  <pre><code>    function checkAnswer(id, is_correct, element)
  {
      clearTimeout(check);
      blink(element, is_correct)
  
      var new_value;
      if(is_correct)
      {
         var old_value =  $('#game_points').text();
         new_value = parseInt(old_value)+current_money;
         game.num_correct++;
      }
      else
      {
          var old_value =  $('#game_points').text();
          new_value = parseInt(old_value)-current_money;
      }
      current_money = new_value;
      game.score = current_money;
  
      $('#game_points').text(new_value);
      game.disableQuestion();
  
  
      $.ajax({
          type: 'POST',
          url: '/Jeopardy/setAnswer',
          dataType: 'json',
          data: {
              request: 'ajax',
              answer_id: id,
              game_id: game.id,
              phase_id: game.phase_id,
              question_id: game.current_question.id,
              is_correct:is_correct
          },
          success: function (data)
          {
  
          }
      });
      game.questionBox.fadeOutAnimation();
      game.num_questions--;
      if(game.num_questions == 0)
      {
          game.finish();
      }
  }
  </code></pre>
  
  <p>As you can see the first line i clear the timeout.</p>
  
  <p>However it continues running untill seconds hits 0 and then calls the <code>checkAnswer</code> method.</p>
  
  <p>Can anyone tell me why this is happening?</p>
  
  <p><strong>Update</strong> </p>
  
  <p>Here is the top of my script:</p>
  
  <pre><code>    readUrlVars();
  var status = true;
  var current_question = null;
  var questionBox;
  var game = null;
  var current_money;
  var check;
  jQuery(document).ready(function () {
  
      init();
      $('#game_table').on('click','.question',function()
      {
          if(status == 'true')
          {
             current_money = parseInt($(this).find('.text-white').text());
             var  current_category_id = $(this).find('.category_id').val();
             game.getQuestion(current_category_id, current_money);
             game.selected_question = $(this);
              var result = 15;
              var seconds = 15;
               check = function(){
                  if(seconds &lt; 0)
                  {
                      checkAnswer(-1, 0, null);
                  }
                  else
                  {
  
                      var percentage = Math.round((seconds / result) * 100);
                      $('#countDownChart').data('easyPieChart').update(percentage);
                      $('#time').text(seconds);
                      seconds--;
  
                      setTimeout(check, 1700); // check again in a second
                  }
              }
  
              check();
  
          }
      })
  
      $('#option_list').on('mouseenter','.optionOutCss', function()
      {
          $(this).attr('class','optionOverCss');
      })
      $('#option_list').on('mouseleave','.optionOverCss', function()
      {
          $(this).attr('class','optionOutCss');
      })
  
  })
  </code></pre>
  
  <p><strong>Update 2</strong></p>
  
  <p>Ive updated my code to the following:</p>
  
  <pre><code>           timeout = setTimeout(timer, 1700);
  
  function timer()
  </code></pre>
  
  <p>{</p>
  
  <pre><code>if(seconds &lt; 0)
  {
      checkAnswer(-1, 0, null);
  }
  else
  {
  
      var percentage = Math.round((seconds / result) * 100);
      $('#countDownChart').data('easyPieChart').update(percentage);
      $('#time').text(seconds);
      seconds--;
  
      setTimeout(timer, 1700); // check again in a second
  }
  }
  
  
      clearTimeout(timeout);
  </code></pre>
  
  <p>however this did not change anything.</p>