Socket
Socket
Sign inDemoInstall

bootstrap-add-clear

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bootstrap-add-clear

jQuery plugin for adding a clear action to the end of a bootstrap text input


Version published
Weekly downloads
568
decreased by-0.35%
Maintainers
1
Install size
12.4 kB
Created
Weekly downloads
 

Readme

Source

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 git@github.com:gesquive/bootstrap-add-clear.git
Direct Download

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

Available Options

OptionTypeDefault
closeSymbolstring
symbolClassstringglyphicon glyphicon-remove-circle
wrapperClassstring
topnumber0
rightnumber0
returnFocusbooleantrue
showOnLoadbooleanfalse
clearOnEscapebooleantrue
hideOnBlurbooleanfalse
zindexnumber100
onClearfunctionnull
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"
})

Keywords

FAQs

Last updated on 31 Oct 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc