Skip to content

About

Capture mousedown and hold, fire event during hold event

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

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

About

Capture mousedown and hold, fire event during hold event

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages