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.

value


Copy values

Jquery library which can copy a value from on field to another.

Values will be copied if to field is or empty or the same as previous value of from field.

Usage:

$('.parent').copyValue({fromSelector: '.from', toSelector:'.to'});

fromSelector is by default: '.from'.
toSelector is by default: '.to'.

Add Clear

Add Clear is a jQuery plugin that adds a input clearing button on any input you apply it to. It clears the value, and returns focus to that field.

Clear the value of a form field (input field or textarea) when it's in focus

This function will clear the value of a form field (input field or textarea) when in focus (e.g "Enter your email address...") and remember the default value. If the field looses focus and the value is empty, the default value will be restored.

The function offers 2 optional parameters:
focus_color (A hexadecimal colour code to be used when the field is in focus)
blur_color (A hexadecimal colour code to be used when the field looses focus)

valuechange - executed when value of a form field is changing

This plugin will raise an event if the value of a form field is changing.

At the moment there is a onchange event provided by default by every browser. But this event is not raised unitl this field looses focus (well, it depends on the field). What if you want to be notified about a change immediatly?
You know the hustle, on a input-text field you need to listen to keypress, paste keyup and blur event's, on a select field it's enough to listen to change, and on radio- and checkbox-input fields it's enough to listen to the click event... etc.

This plugins is gonna do all this work for you. Just bind the valuechange event on the desired field, and you gonna be informed immediatly when the change happens. By returning false on this event, you can avoid making this change or undo the change.

There is a option where you could define if you want to be informed about a valuechange, caused by the jQuery.val() function.

Configurable Serialize

This jQuery plugin adds configuration options to jQuery's standard serialize() function. Its default behavior is identical to the built-in serialize() function, but it offers two configuration options, emptyValues and emptyCheckboxes.

emptyValues defaults to true. When set to false, it causes serialize to omit form elements with no value. This is useful when you have a form with many optional fields and want to keep the form submission small.

emptyCheckboxes defaults to false. When set to true, it causes serialize to include un-checked checkboxes in the serialized form parameters, with no value. This is useful when you want to explicitly tell your server backend to blank checkbox values.

inputDefault

Toggles default text fields values on focus/blur.

Like login forms says "Username" and "****" inside the textbox until you click them and if you blur with an empty value the textbox returns to the default value.

Fork me at: http://github.com/edgarjs/input-default

FancyLogin

FancyLogin is a CSS driven, input stylizing plugin for jQuery. Based on the input's selection and value it applies a class to the input that can be targeted for style in the CSS file.

Styling the input boxes is done based on two states in the CSS. The first is the default state, which is used when a person clicks inside the input, if text has been typed into an input, or if javascript is turned off.

.login input#username { background: url('img/input.username.bg.gif') 0 -18px no-repeat #fff; margin-right: 14px; padding-left: 20px; }

The second state is used when the input boxes are not selected and there is nothing typed inside them. It uses the class “blank” to allow CSS styles to be applied.

.login input#username.blank { background: url('img/input.username.bg.gif') top left no-repeat #fff; }

Val Preset

Allows to predefine a value for an input, textarea or compatible element with val() function.

Permite predefinir el value de un input, textarea o elemento compatible con la función val().

Ejemplo/Example:
$(input).valpreset("String");
$(textarea).valpreset("String2");

$.defaultvalue

Download
Download from the Google Code page.

Description
Defaultvalue is a Jquery plugin that sets a default value on your inputs if they are empty. The default value disappears if the input gain focus or the user types something in it. Perfect for label values like “Search here…”, “Username” or example values like “john.doe@corp.com”. Works with both text and password inputs as well as textareas.

Usage
$(selector).defaultValue('Username');
or

<input id="myInput" type="text" rel="Username" />
$('#myInput').defaultValue();

Works with
IE6,IE7,IE8
FF1,FF2,FF3
Safari3
Chrome1
Opera9

Empty Value

This is a terribly simple plugin (my first one, actually), used for the common practice of applying specific content and design (class name) for a form field while it's empty.

Usage

Call the function on document's ready state, i.e.

$(document).ready(function()
{
$('input.url').empty_value('http://', true, 'empty');
}

The selected input fields will now be filled with the given value and a CSS class will be applied to them. On the focus event, the value and class will be cleared. When blurred, if still empty, they will be applied back to the field.

Available arguments

  • empty_value: The default value to apply to an empty field. Default: none
  • reset: If true, resets the field's default value on focus. Default: true
  • class_name: CSS class name to use for empty fields. Default: 'empty'