InputFocus Documentation

Class: InputFocus

Simply adds the css class 'focused' to an input that currently has focus.

Tutorial/Demo

Implements

Syntax

new InputFocus(input[, options]);
 

Arguments

  1. input - (mixed) an Element or the string id of an Element to manage submissions.
  2. options - (object; optional) an object with key/value sets of options.

Options

  • focusedClass - (string) the css class name to apply when the input has focus; defaults to 'focused'.

Example

new InputFocus($('myInput'), {
    focusedClass: 'highlight'
});