Custom Quantity Buttons

</ head>

<!-- CUSTOM QUANTITY BUTTONS -->
<style>
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
</style>

</ body>

<!-- CUSTOM QUANTITY BUTTONS --> 
<script>
$('.INCREMENT-CLASS').click(function() {
  var $input = $(this).parents('.QUANTITY-GROUP-CLASS').find('.QUANTITY-NUMBER-FIELD-CLASS');
  var val = parseInt($input.val(), 10);
  $input.val(val + 1);
});

$('.DECREMENT-CLASS').click(function() {
  var $input = $(this).parents('.QUANTITY-GROUP-CLASS').find('.QUANTITY-NUMBER-FIELD-CLASS');
  var val = parseInt($input.val(), 10);
  $input.val(Math.max(val - 1, 1));
})
</script>

HTML/Embed

Author
N/A
Published
Jun 15, 2020

How to use:

Tutorial Coming Soon!

Check Browser Support

Interactive Table

Comments

Unfortunately at this time we don't have SSO for comments so you will have to sign up separately to leave your comment. Thanks for understanding!

Now you can add really nice custom buttons for your products quantity field. This is great so users don't have to type the amount anymore.

Clone Project
Documentation
Author:
Built by
Built with
For the best experience

Please switch to desktop to view the content.

Back Home
Thank you! Your submission has been received!
Close Form
Oops! Something went wrong while submitting the form.
Become a Contributor