we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "jquery click hold down"
Angelo
27 May 2019
1var timeoutId = 0;
2
3$('#myElement').on('mousedown', function() {
4    timeoutId = setTimeout(myFunction, 1000);
5}).on('mouseup mouseleave', function() {
6    clearTimeout(timeoutId);
7});