title: How to clear time out in javascript function
body: <p>I have two javascript functions and both work on click event. For each functions i have used set time out property. The problem is if first function is called and second function is called both timeouts are activated together. Is there any way to disable the timer of one function when one is enabled.</p>
  
  <p>SCRIPT:</p>
  
  <pre><code>function overall(){
      $(".one").show();
      $(".two").hide();
      $(".three").hide();
      $(".four").hide();
      setTimeout(overall,1000);       
      }
  
  function mobile(){
      $(".one").hide();
      $(".two").show();
      $(".three").hide();
      $(".four").hide();
      setTimeout(mobile,1000);        
      }
  </code></pre>
  
  <p>If this is the scenario what am i supposed to do? because both functions will be activated and i do not know how to turn off the time out when one is enabled</p>