PageSourceSearch

https://www.avaibook.com/wp-content/themes/avaibook/js/components/lang-switcher.js

js avaibook.com collected 2026-10-01 12:31:44 UTC 908 bytes, 25 lines download raw bytes

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.