Add button feature
This commit is contained in:
18
README.md
Normal file
18
README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Add To Basket Button #
|
||||
|
||||
Use the function to generate the markup. Then just insert the button somewhere in your item element.
|
||||
|
||||
### How to use ###
|
||||
|
||||
1. Copy the code, and use **idmAddToBasket** function to generate the markup
|
||||
2. Don't forget to put it somewhere after
|
||||
|
||||
```
|
||||
const afterWhatPaste = document.getElementById('item-container');
|
||||
const idmAddToBasketElement = idmAddToBasket(product, size);
|
||||
afterWhatPaste.insertAdjacentHTML('afterend', idmAddToBasketElement);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Created by • **[IdoMods](https://idomods.pl/)** • 2025
|
||||
Reference in New Issue
Block a user