skip to Main Content
// Gtranslate - Ensure the dropdown opens and closes correctly without affecting top bar document.addEventListener('DOMContentLoaded', function() { var languageSelector = document.querySelector('.gtranslate_wrapper .gt_switcher .gt_selected'); var dropdown = document.querySelector('.gtranslate_wrapper .gt_switcher .gt_option'); if (languageSelector) { languageSelector.addEventListener('click', function(e) { e.preventDefault(); // Toggle the dropdown display if (dropdown.style.display === 'block') { dropdown.style.display = 'none'; } else { dropdown.style.display = 'block'; } }); // Close the dropdown when clicking outside of it document.addEventListener('click', function(event) { if (!languageSelector.contains(event.target) && !dropdown.contains(event.target)) { dropdown.style.display = 'none'; } }); } });