Created
April 18, 2025 14:21
-
-
Save thinkphp/c7809ab9c0365813aba248856117271c to your computer and use it in GitHub Desktop.
div
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cartItem.innerHTML = ` | |
<div class="item-info"> | |
<h3 class="item-title">${item.name}</h3> | |
<div class="item-price">$${item.price.toFixed(2)} each</div> | |
</div> | |
<div class="item-controls"> | |
<button class="decrease-quantity" data-id="${item.id}">-</button> | |
<span class="item-quantity">${item.quantity}</span> | |
<button class="increase-quantity" data-id="${item.id}">+</button> | |
<button class="remove-item" data-id="${item.id}" style="margin-left: 10px; background-color: #f44336;">×</button> | |
</div> | |
`; | |
cartItemsContainer.appendChild(cartItem); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment