PageSourceSearch

https://castuera.es/js/script.js

js castuera.es collected 2026-10-02 12:25:36 UTC 774 bytes, 23 lines download raw bytes

1// JavaScript Document
2// Script para manejar los submenús
3document.addEventListener('DOMContentLoaded', function() {
4    const dropdowns = document.querySelectorAll('.dropdown-submenu');
5
6    dropdowns.forEach(function(dropdown) {
7        const toggle = dropdown.querySelector('.dropdown-toggle');
8
9        toggle.addEventListener('click', function(e) {
10            e.preventDefault();
11            e.stopPropagation();	
12			const allSubmenus = document.querySelectorAll('.dropdown-submenu .dropdown-menu');
13			allSubmenus.forEach(function(submenu) {
14				submenu.style.display = 'none';
15			});		
16			
17            const submenu = this.nextElementSibling;
18			
19            submenu.style.display = submenu.style.display === 'block' ? 'none' : 'block';
20			
21        });
22    });
23});

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.