Switch
It is for switching from one setting 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-state-options='{}'
.
Parameters | Description | Default value |
---|---|---|
|
The selector to which the text will be generated from the target.text attribute |
null |
|
Text to be updated inside the element specified in the target.selector attribute |
null |
|
Event that triggers a text update | 'change' |
|
Function that fires immediately after the event specified in eventType |
null |
|
If true , the data attribute is overwritten with the new values. Useful when there is interaction with js plugins |
false |