1/* ============================================ 2 AB Lang Switcher â comportamiento dropdown 3 ============================================ */ 4 5(function () { 6 document.addEventListener('DOMContentLoaded', function () { 7 document.querySelectorAll('.ab-lang-switcher').forEach(function (switcher) { 8 var btn = switcher.querySelector('.ab-lang-current'); 9 var dropdown = switcher.querySelector('.ab-lang-dropdown'); 10 11 if (!btn || !dropdown) return; 12 13 // Toggle al hacer clic en el botón 14 btn.addEventListener('click', function (e) { 15 e.stopPropagation(); 16 dropdown.classList.toggle('is-open'); 17 }); 18 19 // Cerrar al hacer clic fuera 20 document.addEventListener('click', function () { 21 dropdown.classList.remove('is-open'); 22 }); 23 }); 24 }); 25})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.