Switch Documentation

Description

Switchery is a simple component that helps you turn your default HTML checkbox inputs into beautiful iOS 7 style switches in just few simple steps. You can easily customize switches, so that they match your design perfectly.

Initialization

Initialize the plugin by referencing the necessary files:

<script src="switchery.min.js"></script>
<link rel="stylesheet" type="text/css" href="switchery.min.css">

Code Structure

To use basic switchery, you need following code

var Switchery = require('switchery');
var elem = document.querySelector('.js-switch');
var init = new Switchery(elem);