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.
<script src="../assets/vendor/hs-quantity-counter/dist/hs-quantity-counter.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 quantity counter
$('.js-quantity-counter').each(function () {
var quantityCounter = new HSQuantityCounter($(this)).init();
});
});
</script>
Basic examples
Modal example
Methods
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' |