sigit_design/assets/js/popups.js
2024-07-25 19:16:25 +03:00

17 lines
691 B
JavaScript

// 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;
if (clickedElement.classList.contains('popupMainInsideWrapperBoxTopBtn')) {
var popupLogin = document.getElementById('popupLogin');
popupLogin.style.display = 'none';
document.body.style.overflow = ''; // Re-enable scroll
}
});