Quantity counter
Quantity counter input idea for Shop systems or so.
How to use?
Copy-paste the following <script>
near the end of your pages under JS Implementing Plugins 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-quantity-counter-options='{}'
Parameters | Description | Default value |
---|---|---|
|
Selector, inside the initialized element, which is responsible for adding a unit to the current value | '.js-plus' |
|
Selector, inside the initialized element, which is responsible for subtracting the unit from the current value | '.js-minus' |
|
Selector, inside the initialized element, which is responsible for displaying the current value | '.js-result' |