Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

events


Commands

This pluging allows message driven development with jQuery.
In this plugin the messages are called commnads.
Any object can subscribe to a given command and commands can
be grouped in namespaces.

A command can be defined for a particular object and then it
is valid until that object is alive. Otherwise is possible to
define a command globally. A globally defined command is valid
until removed.

jQuery Sparkle - jQuery's DRY Plugin/Effect Framework

jQuery Sparkle is a simple but powerful DRY Plugin/Effect Framework aimed to simplify your jQuery development such that you no longer have to repeat yourself.

http://www.balupton.com/projects/jquery-sparkle

It already includes such extensions as:
- An EventCalendar built upon the jQuery UI DatePicker. (It also supports AJAX for loading events).
- jQuery Plugins for the Bespin and TinyMCE WYSIWYG editors.
- A SingleClick Event to easily capture a single click. Unlike the builtin click which fires for each and every click.
- String.prototype.queryStringToJSON to easily convert a QueryString into a JSON Object. Eg. "file.js?a=1" to {a:1}

$.EVENT.SPECIAL.DESTROYED

Provides a destroyed event on jQuery elements for the unreleased jQuery 1.4.3.

Destroyed events:

  • are called before an element's data is removed
  • do not bubble (don't use with live or delegate)

Example

$('.foo').bind("destroyed", function(){
  //teardown here
})

This plugin creates $.event.special.destroyed and overwrites jQuery.removeData.

This plugin is extracted from JavaScriptMVC and maintained by
Jupiter JavaScript Consulting

idleTimer

There are a few cases where you want to know if the user is idle. Namely:

* You want to preload more assets
* You want to grab their attention to pull them back
* You want close their banking session after 5 minutes of inactivity.
* You want the site to sneak off the screen and see if they notice ;-)

This plugin solves those issues by letting you watch user activity and bind handlers to when the user goes idle and returns to activity.

EventsManager

This plugin is used to:

* Copy functions from events attached to one element
* Copy events from one element o another
* Know if one element has one event or not
* Remove events attached to one element
* Remove one event attached to one element
* Change one function attached to one event by another one.
* Get the type of events attached to one element
* Add more than one event at the time
* Get one event attached to one element
* Get all the events attached to one element
* Get all the functions from events attached to one element
* Get all the functions from one event attached to one element
* Know if the element has one function attached to one event
* Know if one function is attached to one event(ex.click) to one element

The usage and demo for this plugin is in the zip file.

It can be used to copy events, detect events, detect malware in functions.

clearLabel

This plugin takes care of hiding your labels and setting them as an input value. Perfect for search forms or short forms without breaking the usability for disabled people, screenreaders and non js-enabled browsers.

If you click the field the text disappears so that you can type your own input. If you leave the field blank and click elsewhere the original content is restored. If content was filled in by your application and it's not the same as your label text. Then it keeps that as a value without disappearing or taking it as a default value.

$(document).ready(function() {
    $('selector').clearLabel();
});

$.onActivation - don't bind an event to an object, just say an element is active

This little jQuery-plugin defines the position, that developers don't need to know whether an element was clicked or used with the keyboard - he just needs to know, that an element was activated (by the user). So onActivation binds basically a click- and a keyup-event to a defined element, and the developer makes sure by using this plugin, that even keyboard users are ready to go. Additionally the plugin also prevents double clicks where double clicks shouldn't be valid.

Use it like this:

$("input[type='submit']").onActivation(function() {
// do something ...
});

or:

$("a").onActivation(function() {
// do something ...
});

Event Broadcaster

A super simple plugin for registering arbitrary events. Useful if you, for example, have made an ajax call whose results should affect several different page elements.

  $("#listening_element").register("new_message", function(_, data) {
    $(this).html(data);
   });

$.get("/url", { success: function(data) { $.broadcast("new_message", data); } });

jQuery topLink

Last week I released a snippet of code for MooTools that allowed you to fade in and out a “to the top” link on any page. Here’s how to implement that functionality using jQuery.

Event Recorder / Playback

Record and playback DOM events to create interactive tours or demonstrations. Generates a fake cursor and plays back with large amounts of precision. Also has the ability to import / export sessions. Check out the homepage for downloads and latest info.