Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 604 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 604 Bytes

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");
        }
    });