I try to make two different functions on one button on events related to fraud. But it does not work, because I can not determine the time on the mousedown event.
var flag; $("#ClikerButton").mousedown(function(e){ //if mouse pressed more than 2 sec, then // do func1 and set flag = true; //else do nothing }).mouseup(function(e){ //if flag == true, do nothing, //else do func2; });
Jitendra ahire
source share