🛠️
shopify-theme
  • shopify-theme
  • Modules
    • Ajax Cart
    • Product
    • Cookies
    • Quantity inputs
  • Links
    • Github
Powered by GitBook
On this page

Was this helpful?

  1. Modules

Quantity inputs

Adds custom dynamic quantity adjustment 'spinners' to number input fields.

product.liquid
 <label for="Quantity" id="quantityWrapper">
   <span>Quantity</span>
   <button type="button" class="js" aria-hidden="true" value="-">Decrease</button>
   <input type="number" id="Quantity" name="quantity" value="1" min="1">
   <button type="button" class="js" aria-hidden="true" value="+">Increase</button>
 </label>

A class or ID {string} is required.

const quantityWrapper = '#quantityWrapper';

const quantityInputTools = new quantityInputs({
  quantityWrapper: quantityWrapper,
});

quantityInputTools();
PreviousCookies

Last updated 5 years ago

Was this helpful?