Skip to content

phuong/jqueryClickAndHold

Repository files navigation

jqueryClickAndHold

Capture mousedown and hold, fire event during hold event. Demo

Usage

Basic usage

Press button and hold, this event will fire until button is released.

    $('button').clickAndHold(function (e, n) {
        console.log("Call me baby ", n);
    });

More options

    $('button').clickAndHold({
        timeout: 200,
        onHold: function(event, times) {
            console.log("Bam");
        },
        onRelease: function(event) {
            console.log("Reload");
        }
    });

Releases

No releases published

Packages

No packages published