A jQuery plugin: delayedClickAction

A jQuery plugin to allow an element to be clicked many times before a specified action is performed. The action/event-handler will be invoked after a specified delay.


Example: Increment a qty multiple times by clicking before an ajax call is made.

Applies to any jQuery query. i.e. a bunch of elements can be involved in the delayed response.

Example here: http://jsfiddle.net/jralston/LMUZ6/

Example usage:

Allow a user to increment or decrement a quantity multiple times before an AJAX call is invoked.

Allow a user to click multiple facets before an AJAX facet-search request is sent.

JQuery Plugin

 Example Usage

In the above example, the #qtyField can be incremented many times before the .delayedClickAction() function parameter is executed.

Working example here:


Comments always welcome…..