Home > jQuery-Default-Input-Text

jQuery-Default-Input-Text

JQuery-Default-Input-Text is a project mainly written in JavaScript, it's free.

Provides default input element content, prevents submitting default, disapears on focus

Functions:

  1. Sets default input element text (from title) and adds 'defaultInput' class.
  2. Removes that text and class when input is focused
  3. If nothing is entered restores default text & class when focus is lost
  4. Removes default text from input on submit if it's still present

As usual - cross browser compatible & as lightweight as possible.

Usage example:

$('#form_id').jQLiteID();

or to enable it for all forms:

$('form').jQLiteID();

Previous:pango-nacl