Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
charrviwadhwa committed Oct 24, 2024
2 parents 88a178b + 46257bb commit 7380a3f
Show file tree
Hide file tree
Showing 4 changed files with 419 additions and 224 deletions.
2 changes: 2 additions & 0 deletions aboutus.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
text-align: center;
}



.feature:hover {
transform: translateX(-5px);
box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.15);
Expand Down
25 changes: 0 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -689,31 +689,6 @@ <h2>Feedback Form</h2>
</svg>
</button>

<script>
let cartItemCount = 0;
// document.querySelectorAll('#cart-btn').addEventListener('click', function () {
// cartItemCount++; // Increment cart count
// document.getElementById('cart-count').textContent = cartItemCount; // Update cart count display
// alert('Item added to cart'); // Show alert
// });


const cartButtons = document.querySelectorAll('#cart-btn');
cartButtons.forEach(button => {
button.addEventListener('click', function () {
cartItemCount++; // Increment cart count
document.getElementById('cart-count').textContent = cartItemCount; // Update cart count display
alert('Item added to cart'); // Show alert
});
});
// Function to handle Add to Cart button click
// document.getElementById('cart-btn').addEventListener('click', function () {
// cartItemCount++; // Increment cart count
// document.getElementById('cart-count').textContent = cartItemCount; // Update cart count display
// alert('Item added to cart'); // Show alert
// });

</script>
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>

<script>
Expand Down
11 changes: 10 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,4 +478,13 @@ function clearForm() {
// Load the form data when the page is loaded
window.onload = loadFormData;


let cartItemCount = 0;

const cartButtons = document.querySelectorAll('#cart-btn');
cartButtons.forEach(button => {
button.addEventListener('click', function () {
cartItemCount++; // Increment cart count
document.getElementById('cart-count').textContent = cartItemCount; // Update cart count display
alert('Item added to cart'); // Show alert
});
});
Loading

0 comments on commit 7380a3f

Please sign in to comment.