2024-07-25 16:16:25 +00:00
|
|
|
// Function to handle loginBtn click
|
|
|
|
document.getElementById('loginBtn').addEventListener('click', function() {
|
|
|
|
var popupLogin = document.getElementById('popupLogin');
|
|
|
|
popupLogin.style.display = 'flex';
|
|
|
|
document.body.style.overflow = 'hidden'; // Disable scroll
|
|
|
|
});
|
|
|
|
|
|
|
|
// Function to handle popupMainInsideWrapperBoxTopBtn click
|
|
|
|
document.addEventListener('click', function(event) {
|
|
|
|
var clickedElement = event.target;
|
2024-07-26 15:01:13 +00:00
|
|
|
var popupMainInsideWrapperBoxTopBtn = document.querySelector('.popupMainInsideWrapperBoxTopBtn');
|
|
|
|
|
|
|
|
// Check if the clicked element or its parent elements match the target
|
|
|
|
if (popupMainInsideWrapperBoxTopBtn.contains(clickedElement)) {
|
2024-07-25 16:16:25 +00:00
|
|
|
var popupLogin = document.getElementById('popupLogin');
|
|
|
|
popupLogin.style.display = 'none';
|
|
|
|
document.body.style.overflow = ''; // Re-enable scroll
|
|
|
|
}
|
|
|
|
});
|