-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.js
More file actions
21 lines (19 loc) · 831 Bytes
/
Copy pathscripts.js
File metadata and controls
21 lines (19 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// JavaScript for handling Add to Cart functionality
function addToCart(productName) {
alert(productName + " has been added to your cart!");
}
// JavaScript for handling popup modal
function showPopup(message) {
// Set the message inside the popup modal
document.getElementById('popup-message').innerText = message;
// Display the popup modal
document.getElementById('popup').style.display = 'block';
// Add animation class (optional, if animations are used)
document.getElementById('popup').classList.add('show-animation');
}
function closePopup() {
// Hide the popup modal
document.getElementById('popup').style.display = 'none';
// Remove animation class (optional, if animations are used)
document.getElementById('popup').classList.remove('show-animation');
}