GithubHelp home page GithubHelp logo

happyleilei / bootstrap-switch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bttstrp/bootstrap-switch

0.0 1.0 0.0 1.61 MB

Turn checkboxes and radio buttons in toggle switches.

Home Page: http://bootstrapswitch.site

License: MIT License

JavaScript 22.77% HTML 66.82% CSS 10.40%

bootstrap-switch's Introduction

Bootstrap Switch

Dependency Status devDependency Status NPM Version

Turn checkboxes and radio buttons into toggle switches. Created by Mattia Larentis, maintained by Emanuele Marchi and Peter Stein with the help of the community.

Quick start

Several quick start options are available:

  • Download the latest release
  • Clone the repo: git clone https://github.com/Bttstrp/bootstrap-switch.git
  • Install with npm: npm install bootstrap-switch
  • Install with yarn: yarn add bootstrap-switch
  • Install with Composer: composer require components/bootstrap-switch
  • Install with Bower: bower install bootstrap-switch
  • Install with NuGet: PM> Install-Package Bootstrap.Switch (NuGet package)

Include the dependencies: jQuery, Bootstrap and Bootstrap Switch CSS + Javascript:

<link href="bootstrap.css" rel="stylesheet">
<link href="bootstrap-switch.css" rel="stylesheet">
<script src="jquery.js"></script>
<script src="bootstrap-switch.js"></script>

Add your checkbox:

<input type="checkbox" name="my-checkbox" checked>

Initialize Bootstrap Switch on it:

$("[name='my-checkbox']").bootstrapSwitch();

Enjoy.

Supported browsers

IE9+ and all the other modern browsers.

LESS

  • For Bootstrap 2 (no longer officially supported), import src/less/bootstrap2/bootstrap-switch.less
  • For Bootstrap 3, import src/less/bootstrap3/bootstrap-switch.less

Bugs and feature requests

Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.

The new issue should contain both a summary of the issue and the browser/OS environment in which it occurs and a link to the playground you prefer with the reduced test case. If suitable, include the steps required to reproduce the bug.

Please do not use the issue tracker for personal support requests: Stack Overflow is a better place to get help.

Known issues

  • Make sure .form-control is not applied to the input. Bootstrap does not support that, refer to Checkboxes and radios

Integrations

License

Licensed under the MIT License.

bootstrap-switch's People

Contributors

aimeast avatar ceefour avatar drewfreyling avatar engoyan avatar frapontillo avatar grahamcampbell avatar graingert avatar ickbinhier avatar jonathanbarton avatar julusian avatar manuelmeurer avatar marclaporte avatar markmarkoh avatar michaek avatar mtj8033 avatar nathasm avatar nostalgiaz avatar nwhite89 avatar oniram88 avatar owlycode avatar pasvaz avatar pauloortins avatar putnik avatar regepan avatar root-talis avatar same31 avatar scavenger3 avatar t3chn0r avatar volpino avatar zstars 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.