title: jQuery stop setTimeout if user clicks in input field
body: <p>I have the following jQuery functions:</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
    $(function() {
  // setTimeout() function will be fired after page is loaded
  // it will wait for 5 sec. and then will fire
  // $("#successMessage").hide() function
  setTimeout(function() {
      $("#subscribe-floating-box").animate({"height": "toggle"}, { duration: 300 });
  }, 3000);
  });
  &lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
     function ShowHide(){
     $("#subscribe-floating-box").animate({"height": "toggle"}, { duration: 300 });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>And I also have the following form:</p>
  
  <pre><code>&lt;div id="subscribe-floating-box"&gt;
  &lt;form action="" method="post" accept-charset="utf-8" id="subscribe-blog"&gt;
  &lt;input type="text" name="email" style="width: 95%; padding: 1px 2px" value="someone@example.com" id="subscribe-field" onclick="if ( this.value == 'Email Address' ) { this.value = ''; }" onblur="if ( this.value == '' ) { this.value = 'Email Address'; }"&gt;
  &lt;input type="hidden" name="action" value="subscribe"&gt;
  &lt;input type="hidden" name="source" value="http://example.com"&gt;
  &lt;input type="hidden" name="redirect_fragment" value="blog_subscription-2"&gt;
  &lt;input type="submit" value="Subscribe" name="jetpack_subscriptions_widget"&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Finally, there is a "button" (an image) which opens a form. That button has this code:</p>
  
  <pre><code>&lt;a href="#" title="" onClick="ShowHide(); return false;" class="cart-buttom"&gt;&lt;img src="&lt;?php echo get_template_directory_uri(); ?&gt;/library/images/email-signup-button.png" style="position:relative; top:-146px;" /&gt;&lt;/a&gt;
  </code></pre>
  
  <p>(please ignore inline CSS - this is my working draft). </p>
  
  <p>In other words, I have an E-mail sign up button which opens subscribe form. This form is initially shown, but it is closed after 3000 interval by the setTimeout function, and called back if a user clicks email-signup-button.png image. After it is called back with a click, it will no longer autohide after 3000.</p>
  
  <p>What I would need is: is it possible to stop setTimeout function if a viewer clicks inside the email input field? He doesn't have to start typing anything, but simply if he clicks inside. I don't want the form to close if he decides to put e-mail address in. Although it is unlikely that someone will immediately go to write hers/his e-mail inside as soon as they visit the site, I would like to eliminate this possibility.</p>