title: How can i do button on hold for two second call function1 if less then two second call function2?
body: <p>I have this button which is not working correctly for hold button for a period (but it works like click only). </p>
  
  <p>Where i was trying to do if the button is <code>hold</code> for greater/equal then 2 seconds then <code>callfunction1</code>, if the button was pressed less then 2 seconds then <code>callfuntion2</code>.</p>
  
  <pre><code>var clickDisabled = false;
  
  function clickLocker() {      
    /* @Button: 2 seconds */
    clickDisabled = true;
    setTimeout(function(){clickDisabled = false;}, 2000);      
  }
  
  function callfunction1() { // you have hold he button for greater then or equal 2 second } 
  function callfunction2() { // you have hold the button less then 2 second } 
  
  $('.button').live("click",function()
  { 
    if (clickDisabled) {
      alert("locked for 2 second");
      return;
    }
    clickLocker();
  });
  </code></pre>