Code Monkey home page Code Monkey logo

bootstrap-select's Introduction

bootstrap-select

A custom select/multiselect for Bootstrap using button dropdown, designed to behave like regular Bootstrap selects.

Demo and Documentation

See Bootstrap 3 examples here and here.

Authors

Modifications by thdoan

  • Added option for custom caret icon class
  • Added option for thumbnails in <option>
  • Added title for <option> element
  • Added aria-hidden="true" for all icons
  • Added logic to sync disabled state on 'change' event
  • Changed cursor for optgroup headers to 'default'
  • Suppressed checkmark element if not multi-select
  • Decoupled iconBase class so you can mix and match
  • Removed using <option> value as title (uses <select> title)
  • Removed showContent option (add data attribute to show)
  • Removed showIcon option (add data attribute to show)
  • Removed showSubtext option (add data attribute to show)
  • Minor code optimizations

Usage

Create your <select> with the .selectpicker class.

<select class="selectpicker">
  <option>Mustard</option>
  <option>Ketchup</option>
  <option>Barbecue</option>
</select>

If you use a 1.6.3 or newer, you don't need to to anything else, as the data-api automatically picks up the <select>s with the selectpicker class.

If you use an older version, you need to add the following either at the bottom of the page (after the last selectpicker), or in a $(document).ready() block.

// To style only <select>s with the selectpicker class
$('select.selectpicker').selectpicker();

Or

// To style all <select>s
$('select').selectpicker();

If you want to use a custom caret icon:

// Set custom caret icon
$('select.selectpicker').selectpicker({
  caretIcon: 'fa fa-angle-down'
});

Check out the documentation for further information.

Copyright and License

Copyright (C) 2013-2015 bootstrap-select

Licensed under the MIT license.

bootstrap-select's People

Contributors

altearius avatar althaus avatar anacarolinats avatar antonellopasella avatar carlosrberto avatar caseyjhol avatar dcwatson avatar gaspardle avatar jonathantneal avatar leoberdu avatar markhalliwell avatar martinpanek87 avatar mc7244 avatar misatotremor avatar nerone21 avatar nijikokun avatar noirbizarre avatar nushio avatar oleg-voloshyn avatar peterdavehello avatar raido avatar renhammington avatar roundrobinquantum avatar silviomoreto avatar smashercosmo avatar t0xiccode avatar tristanlee85 avatar truckingsim avatar vsn4ik avatar zhomart 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.