PageSourceSearch

https://www.markenverband.de/_assets/4fb6b27ea88e0519a27bcac31fc86ae5/JavaScript/SearchResult.js?1789570803

js markenverband.de collected 2026-10-02 09:55:13 UTC 787 bytes, 26 lines download raw bytes

1const dropdown = document.querySelector('.sort-dropdown');
2const trigger = document.getElementById('sortTrigger');
3const menu = document.getElementById('sortMenu');
4const sortOptions = menu.querySelectorAll('.sort-option');  // ← renamed
5
6trigger.addEventListener('click', (e) => {
7  e.stopPropagation();
8  dropdown.classList.toggle('open');
9});
10
11// Close when clicking outside
12document.addEventListener('click', () => {
13  dropdown.classList.remove('open');
14});
15
16// Select option
17sortOptions.forEach(option => {
18  option.addEventListener('click', () => {
19    document.querySelector('.sort-label').textContent = option.textContent;
20    
21    sortOptions.forEach(o => o.classList.remove('active'));
22    option.classList.add('active');
23    
24    dropdown.classList.remove('open');
25  });
26});

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.