Updates to jquery onHold plugin

Written by Kevin on November 30, 2011

I have made some updates to the jquery onhold plugin. I also added it on github. The updates include

  • Default setting
  • Supports more than one selector
  • Easier ability to add in more options, if ever needed (I have some ideas)


Github: https://github.com/mrkmg/jquery.onHold


DEMO: http://jsfiddle.net/bCgWW/

Updated Code:

This is free software, its code can be redistributed and/or modified at will for any purpose. Just leave this header here. Thanks



time:     Period of time a user should have to hold their mouse button down on an object to fire the event;
        Measured in Milliseconds
        Defaults to 5000


(function( $ ){ $.fn.onHold= function(callback,options) {

    var settings = $.extend({

    return this.each(function(){
        var $this = $(this);


})( jQuery );