Giter Site home page Giter Site logo

zarv1k / bootstrap-add-clear Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gesquive/bootstrap-add-clear

0.0 2.0 0.0 231 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

HTML 100.00%

bootstrap-add-clear's Introduction

Maintainer: Gus Esquivel
Plugin Website: https://github.com/gesquive/bootstrap-add-clear
Contributers: Stephen Korecky, scoman81, Steve887, Deividy


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

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

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.