Skip to content

thisliquidspace/clearable_text_field

 
 

Repository files navigation

Clearable Text Field is a jQuery plugin which shows up a cross icon to clear value when user input something in a form field.
Seeing example is the fastest way to understand. Example

FAQ

Selector examples

// All text fields
$('input[type=text]').clearableTextField();

// All text fields in search form
$('div.search input[type=text]').clearableTextField();

// All text fields but foo class
$('input:not(.foo)[type=text]').clearableTextField();

Can I change the cross image and the style?

Yes, you can do with editing or replacing jquery.clearableTextField.css.

Browser compatibility

I’ve tested with:

  • Safari4, FF3.5 on OS X
  • IE6, IE7, IE8, FF3.5 on win XP

jQuery version

I’ve tested with 1.3 and 1.4

Download

Just git clone or “download source” link above.

Contributors

Tatsuya Ono: me :)
Go Kameda: designed default icon.

About

jQuery plugin adding a clear button in text input fields

Resources

Stars

Watchers

Forks

Packages

No packages published