Skip to content
Ivan Kalatchev edited this page Nov 4, 2020 · 4 revisions

The switch is a HTML component, that presents a boolean (true/false) value.

Switch-On

How to use it?

Example Code

Normal Switch

<span class="switch">

<label>A</label>

<input type="checkbox" class="switch" id="switch-id" checked>

<label for="switch-id">B</label>

</span>

Classes

switch disabled

Variants

switch switch-sm switch-lg

Get Value

JQuery

You can get the value of certain switch with JQuery, as it follows below.

$("#switch-id")[0].checked

Clone this wiki locally