Giter Site home page Giter Site logo

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bootstrap-add-clear's Issues

invisible clear button when span.input-group-btn is attached

following code doesn't show properly clear-button:


<div class="form-group search optional q_query">
  <label class="search optional col-sm-3 control-label" for="q_query">Dokument obsahuje</label>
  <div class="col-sm-9">
    <div class="input-group col-sm-12">
      <input id="q_query" class="string required form-control clear-button" type="text" name="q[query]" value="asdfadsasdf">
      <span class="input-group-btn">
        <button id="query_button" class="btn btn-default" type="submit">
      </span>
    </div>
  </div>
</div>

This could be fixed by setting z-index to span.add-clear-x element.

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.