jQuery Plugin For Delayed Event Execution

Overview
bindWithDelay jQuery plugin
Author: Brian Grinstead
MIT license: http://www.opensource.org/licenses/mit-license.php

http://github.com/bgrins/bindWithDelay
http://briangrinstead.com/files/bindWithDelay

Usage: 
	See http://api.jquery.com/bind/
	.bindWithDelay( eventType, [ eventData ], handler(eventObject), timeout, throttle )

Examples:
	$("#foo").bindWithDelay("click", function(e) { }, 100);
	$(window).bindWithDelay("resize", { optional: "eventData" }, callback, 1000);
	$(window).bindWithDelay("resize", callback, 1000, true);
You might also like...

A lightweight jQuery custom scrollbar plugin, that triggers event when reached the defined point.

Scrollbox A lightweight jQuery custom scrollbar plugin, that triggers event when reached the defined point. Demo Page Table of contents Browser compat

Jul 22, 2022

Examples of how to do query, style, dom, ajax, event etc like jQuery with plain javascript.

You (Might) Don't Need jQuery Frontend environments evolve rapidly nowadays and modern browsers have already implemented a great deal of DOM/BOM APIs

Dec 24, 2022

JQuery charCounter - jQuery Character Counter Plugin

JQuery charCounter - jQuery Character Counter Plugin

jQuery Character Counter A jQuery based character counter for input and textarea HTML tags. What is this? This simple plugin allows you to add a c

Aug 10, 2022

jQuery quick notification plugin. jQuery плагин быстрых уведомлений

Note: English translation by Google Translate Notific About Description: this is a jQuery plugin that helps you display notifications on your site. Li

Nov 7, 2021

Work around some mobile browser's 300ms delay on the click event.

jQuery fastClick plugin Work around the 300ms delay for the click event in some mobile browsers (e.g. Android and iOS). Code based on http://code.goog

Jul 6, 2020

A lightweight normalized tap event

A lightweight normalized tap event

🚫 Retired: Tappy! Per our unmaintained repository status documentation this repository is now retired and is no longer accepting issue reports or pul

Dec 9, 2022

An event emitter that allows you to manage your global state

Thor Event Emitter Event emitter to manage your state. An event emitter that allows you to manage your global state. Instead of using global giant obj

Apr 18, 2022

Event scheduler is a simple app for viewing the events happening around you

Event scheduler is a simple app for viewing the events happening around you. User can also create their event and include a location. Location can also be marked as hidden(strictly by IV). Built with React and Styled Components

Mar 29, 2022

The invoker based on event model provides an elegant way to call your methods in another container via promisify functions

The invoker based on event model provides an elegant way to call your methods in another container via promisify functions. (like child-processes, iframe, web worker etc).

Dec 29, 2022
Comments
  • onDelay function

    onDelay function

    new jQuery replaced .bind() and a few others with .on, so I wanted a version that worked like the .on() function.

    Here's my full onDelay() (I removed the "With" in the name for my own use, as I thought it was redundant). It's closely based on your code. If you want to include it in your repository, go ahead. No author notice required.


    (function($) { $.fn.onDelay = function(events, selector, data, handler, timeout, throttle) { if ($.isFunction(selector)) { throttle = handler; timeout = data; handler = selector; data = undefined; selector = undefined; } else if ($.isFunction(data)) { throttle = timeout; timeout = handler; handler = data; data = undefined; }

    // Allow delayed function to be removed with handler in unbind function
    handler.guid = handler.guid || ($.guid && $.guid++);
    
    // Bind each separately so that each element has its own delay
    return this.each(function() {
        var wait = null;
    
        function callback() {
            var event = $.extend(true, { }, arguments[0]);
            var that = this;
            var throttler = function() {
                wait = null;
                handler.apply(that, [event]);
            };
    
            if (!throttle) { clearTimeout(wait); wait = null; }
            if (!wait) { wait = setTimeout(throttler, timeout); }
        }
    
        callback.guid = handler.guid;
    
        $(this).on(events, selector, data, callback);
    });
    

    } })(jQuery);

    opened by vanderlee 9
  • Proxy methods for bindWithDelay/onBind

    Proxy methods for bindWithDelay/onBind

    Minimalist proxy methods for bindWithDelay/onBind.

    You could still be backwards compatible if both proxy methods were aliasses of onDelay; any existing code should still work as is, but you could now add a selector like onDelay.

    Also adjusted the index.html to use only onDelay; seems to work fine, but I'll look into qunit as you suggested.

    opened by vanderlee 5
  • totalSelector elements' number isn't updated after a CTRL+A

    totalSelector elements' number isn't updated after a CTRL+A

    After I select all the rows with a CTRL+A I expect all the values inside the elements selected using the "totalSelector" selector to get updated, but they don't.

    A test case of this problem can also be the advanced table provided into the demo page.

    opened by fabiospampinato 0
  • highlight:before/after hooks are not triggered after a CTRL+ALT+A

    highlight:before/after hooks are not triggered after a CTRL+ALT+A

    Like the title says my "highlight:before" and "highlight:after" hooks aren't triggered after I perform the hotkey to unselect all the rows, how can I solve the problem?

    P.S. The rows get selected or unselected as expected.

    opened by fabiospampinato 0
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Provides a KafkaJS-compatible handler for processing messages that facilitates publishing to delayed-retry or dead-letter topics

kafkajs-async-retry This module handles retries and dead-lettering for messages from a Kafka topic without blocking the processing of subsequent messa

Shutterstock 5 Dec 5, 2022
io-ts Typed Event Bus for the runtime of your Node.js application. A core for any event-driven architecture based app.

Typed Event Bus Based on io-ts types, this bus provides a handy interface to publish and consume events in the current runtime of the Node.js process.

Konstantin Knyazev 3 May 23, 2022
'event-driven' library aims to simplify building backends in an event driven style

'event-driven' library aims to simplify building backends in an event driven style(event driven architecture). For message broker, light weight Redis Stream is used and for event store, the well known NoSQL database, MongoDB, is used.

Sihoon Kim 11 Jan 4, 2023
ROP userland execution for PS5 (4.03)

# Exploring the Playstation 5 Security - Userland Introduction The PlayStation 5 was released on November 12th 2020. While it's similar to the PS4 in

null 230 Dec 2, 2022
"Lerna & Distributed Task Execution" Example

Lerna Distributed Task Execution (DTE) Example/Benchmark On how to make your CI 23 times faster with a small config change New versions of Lerna can u

Victor Savkin 9 Nov 27, 2022
Open, extensible, small and simple behaviour-graph execution engine

Behave-Graph Behave-Graph is a standalone library that implements the concept of "behavior graphs" as a portable TypeScript library with no external r

Ben Houston 167 Dec 29, 2022
A simple in-memory time-based cache for both objects and function execution.

What is this? A simple in-memory time-based cache for both objects and function execution. How do I install it? You can install it by using the follow

cadienvan 7 Dec 15, 2022
A simple in-memory key-value cache for function execution, allowing both sync and async operations using the same methods

A simple in-memory key-value cache for function execution, allowing both sync and async operations using the same methods. It provides an invalidation mechanism based both on exact string and regex.

cadienvan 10 Dec 15, 2022