Toggle Switch
Switch from one value to another.
How to use?
Copy-paste the following <script>
near the end of your pages under JS Front to enable it.
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
Methods
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-hs-toggle-switch-options='{}'
.
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. | - |