Documentation

Describes the short and stout documentation of this plugin

Options

The options that can be passed are:

css

The CSS classes to be toggled between, if more than one class, separate by space "classone classtwo", you can also specify "" if no toggling should occur.

Remember that each time you call the function with an element, the default css class "hinttoggle" is written. You can easily remove the class after the toggle.

blurValue

This value is what is to be set when an item is 'unfocused' or deselected

The default is ""

focusValue

A value that is to be set when the field is focused, in the example below, on one field the focusvalue "http://www." is set. in case you want some predefined data.

Download

Minified version
Bulky version
The CSS file...
This is the code used (in case you don't want to view the source)
$(document).ready(function(){
	$('input').hinttoggle();
	$($('input')[1]).hinttoggle({blurValue:'Values set from js',focusValue:'http://www.'});
	$($('input')[2]).hinttoggle({css:'otherhint hinttoggle'});
	
	$($('input')[3]).hinttoggle({css:""}).removeClass('hinttoggle');
});

<form>
<input type="input" value="normal value" />
<input type="input" />
<input type="input" value="another class" />
<input type="input" value="no CSS toggling" />
</form>