How to make a "long click" with jquery?

There is a website, the site has a dashboard-type Launchpad on OSX or launcher on iOS.
The point is that when you long press on a div it needs to begin to move and show the button delete. Question with the advent of the Delete button solved using jquery. The question of "vacillation" is solved by the jquery plugin.classywiggle.

Maybe someone already had to implement "long-click"?
October 3rd 19 at 01:34
2 answers
October 3rd 19 at 01:36
Solution
October 3rd 19 at 01:38
Solution
var pressTimer

$("a").mouseup(function(){
clearTimeout(pressTimer)
 // Clear timeout
 return false;
}).mousedown(function(){
 // Set timeout
 pressTimer = window.setTimeout(function() { ... your code ...},1000)
 return false; 
});

Find more questions by tags jQuery