Answers for "jquery click hold down"

0

jquery click hold down

var timeoutId = 0;

$('#myElement').on('mousedown', function() {
    timeoutId = setTimeout(myFunction, 1000);
}).on('mouseup mouseleave', function() {
    clearTimeout(timeoutId);
});
Posted by: Guest on April-03-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language