Maintainer: Gus Esquivel
Plugin Website: https://github.com/gesquive/bootstrap-add-clear
Contributers:
Stephen Korecky,
scoman81,
Steve887,
Deividy
This project is a fork of Stephen Korecky's "Add Clear" project. It is meant to work as a drop-in replacement when using bootstrap.
How you acquire bootstrap-add-clear is up to you.
Install with Bower:
bower install bootstrap-add-clear
Clone the boostrap-add-clear repository:
git clone [email protected]:gesquive/bootstrap-add-clear.git
Note: bootstrap-add-clear has a dependency on jquery 1.8+ and Bootstrap 3
Option | Type | Default |
---|---|---|
closeSymbol | string | |
symbolClass | string | glyphicon glyphicon-remove-circle |
wrapperClass | string | |
top | number | 0 |
right | number | 0 |
returnFocus | boolean | true |
showOnLoad | boolean | false |
clearOnEscape | boolean | true |
hideOnBlur | boolean | false |
onClear | function | null |
$("input").addClear({top : -2, right : 6});
// Example onClear option usage
$(":input").addClear({
onClear: function(){
alert("call back!");
}
});
// Example font awesome icon usage
$(":input").addClear({
symbolClass: "fa fa-times-circle"
})