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.

clone


one_time_action - Disable submits and links after click, and enable them again after a timeout or with a function if needed

jQuery plugin: one_time_action

About

JQuery plugin that can be used on submits, buttons and links: Makes them
work only once. They can be reactivated after a given time or by a specific
function call.

Demo site: http://www.headjump.de/article/jquery-plugin-one_time_action

Get it here: http://github.com/headjump/one_time_action/archives/master

plus repeater

tool for repeat dom object like input form
you can create multiple row of input
and create when last row is focus
easy to use
$(function(){
$.repeater('repeater' ,0);
})
options

  • id of repeat area
  • start number

and use template

  • #no# refer to add number
  • #repeatid# refer to id of new block

fake

fake is a method which creates a fake clone of a object, usable for overlay animations and such.

Example:
$('div').fake().delay(1000).hide('slide',1000, {},function() {$(this).unwrap().remove();});

Result: none :-P

Block Manager

Add and delete form fields with buttons add and delete
usage:

    <script src="./js/jquery-1.3.2.min.js"></script>
    <script src="./js/jquery.tmpl.js"></script>
    <script src="./js/jquery.blockmanager.js"></script>
<script language="JavaScript">
$(document).ready(function() {

    $blockEdu = $('#tableBottomRowEdu').blockmanager({
        names: {
            name: "text",
            specialnost: "select"
        },
        fieldsName: "user[edu]",
        templateItem: "#templateItemEdu",
        templatePrefix: "eduTr",
        itemId: "user_id",
        buttonAddId: "eduAdd"
    });

    // add empty fields
    $blockEdu.addItem("", {});

    // add block with values
    $blockEdu.addItem('2', {
        name: "Jhon Connor",
        specialnost: "2"
    });
});
</script>

jquery.dupeIt

dupeIt is a jquery plugin that allows you to duplicate and remove DOM elements and their children with one click. dupeIt smartly renames duplicated elements by appending the iteration number, ex. "txt_mytextfield" duplicate would be "txt_mytextfield2". This plugin is particularly useful for multiple file uploads. See documentation for full details.

XClone

This plugin depends upon the Values plugin to provide an enhanced clone method.
This "xclone" method will store the element it is called on as a template
of sorts, and then create sibling clones that have the specified values
automatically set and are also automatically inserted below (or, optionally,
above) where the original prototype was located. In essence, this enhances
the template-ish abilities of the Values plugin in a fashion similar to what
the jsRepeater plugin does, but with only standard XML/HTML syntax.

This is particulary useful for AJAX applications, allowing the initial document
to contain just an "empty" element set that serves as a location marker and template for clones which are filled with model data loaded/generated on the client side.

The demo (and its source) are probably the best documentation thus far.

Clonefield

jQuery.cloneField is a plugin that provides you with easy, dynamic form field (or any other DOM element, really) duplication and removal.

Its main purpose is to allow the duplication of a specific field (or fields) within a form, usually a file upload field (think gmail attachments).

It's really simple to use. Just create a button (<a>, <button>, <span>, <p>, whatever, really) immediately BEFORE the field(s) to clone and apply the clonefield plugin to it, passing the desired jQuery elements as the first parameter.

$("a#add").cloneField($("input#file"));

It's that simple.

$.cloneField has a number of customizable parameters that you can pass as a second argument.

allowRemove: true, // allow removal of cloned elements; automatically creates removal button based on "add" button markup to create consistency
removeLabel: "Remove", // text for removal button
maxClones: 0, // maximum number of cloned fields