I know \'mousedown\' is when user press the mouse, \'mouseup\' is when user release the mouse. But I want to listen the event after user press the mouse and hold it until it
If you want the hold state then it will be the state when you are in mousedown event state for a while. This state exists when you press mousedown but not mouseup. Hence you need to take a variable which records the current state of the event.
JS
$('div').on('mousedown mouseup', function mouseState(e) {
if (e.type == "mousedown") {
//code triggers on hold
console.log("hold");
}
});
Working Fiddle