Toggle Switch
Switch from one value to another.
How to use
Copy-paste the following <script>
near the end of your pages under JS Implementing Plugins to enable it.
<script src="../assets/vendor/hs-toggle-switch/dist/hs-toggle-switch.min.js"></script>
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
<script>
$(document).on('ready', function () {
// initialization of toggle switch
$('.js-toggle-switch').each(function () {
var toggleSwitch = new HSToggleSwitch($(this)).init();
});
});
</script>
Examples
Modal example
Methods
Parameters | Description | Default value |
---|---|---|
|
Selectors in which the text value will be changed from min to max with animation, for each element specified in the array. Essentially, count up/count down happens. |
undefined |
|
true is necessary to prepare a script for the correct processing of data, in those cases when the control element (entity), in the active (active) state. |
false |
|
Event that runs the script. | 'change' |
|
Default value for each item. | - |
|
Maximum value (to which count up will be carried out), for each item. | - |