Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery click hold down

var timeoutId = 0;

$('#myElement').on('mousedown', function() {
    timeoutId = setTimeout(myFunction, 1000);
}).on('mouseup mouseleave', function() {
    clearTimeout(timeoutId);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #click #hold
ADD COMMENT
Topic
Name
4+3 =