GithubHelp home page GithubHelp logo

wooodhead / bootstrap-add-clear Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gesquive/bootstrap-add-clear

0.0 1.0 0.0 248 KB

bootstrap plugin to add a (x) clear button to your input fields

Home Page: http://gesquive.github.io/bootstrap-add-clear

License: MIT License

bootstrap-add-clear's Introduction

Maintainer: Gus Esquivel
Plugin Website: http://gesquive.github.io/bootstrap-add-clear
Contributers: Stephen Korecky, scoman81, Steve887, Deividy, zarv1k, grrizzly, adambiggs, Vladekk, denisj, starspoint


About

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.

Getting Started

How you acquire bootstrap-add-clear is up to you.

Bower

Install with Bower:

bower install bootstrap-add-clear

NPM

Install with NPM:

npm install bootstrap-add-clear

If you are using browserify to bundle, you will have to expose jQuery globally:

entry.js

var $ = require('jquery');
global.jQuery = $;
require('bootstrap-add-clear');

Github

Clone the boostrap-add-clear repository:

git clone [email protected]:gesquive/bootstrap-add-clear.git

Direct Download

Note: bootstrap-add-clear has a dependency on jquery 1.8+ and Bootstrap 3

Available Options

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
zindex number 100
onClear function null

Using Options

$("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"
})

bootstrap-add-clear's People

Contributors

austinmontoya avatar deividy avatar denisj avatar gesquive avatar jameswragg avatar skorecky avatar vladekk avatar zarv1k avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.