Capture mousedown and hold, fire event during hold event
Capture mousedown and hold, fire event during hold event. Demo
Press button and hold, this event will fire until button is released.
$('button').clickAndHold(function (e, n) {
console.log("Call me baby ", n);
});
$('button').clickAndHold({
timeout: 200,
onHold: function(event, times) {
console.log("Bam");
},
onRelease: function(event) {
console.log("Reload");
}
});