Skip to content
Иван Калъчев edited this page Jan 15, 2023 · 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