PageSourceSearch

https://supercellars.com.au/application/themes/myfoodlink/js/search.js

js supercellars.com.au collected 2026-09-28 14:46:56 UTC 904 bytes, 27 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function() {
2    const searchToggle = document.querySelector('.search-toggle');
3    const searchForm = document.querySelector('.search-form');
4    const searchInput = document.querySelector('.search-input');
5    
6    searchToggle.addEventListener('click', function(e) {
7        e.preventDefault();
8        searchForm.classList.toggle('active');
9        if (searchForm.classList.contains('active')) {
10            searchInput.focus();
11        }
12    });
13
14    // Close search when clicking outside
15    document.addEventListener('click', function(e) {
16        if (!e.target.closest('.search-container')) {
17            searchForm.classList.remove('active');
18        }
19    });
20
21    // Submit form on Enter
22    searchInput.addEventListener('keydown', function(e) {
23        if (e.key === 'Enter') {
24            e.target.closest('form').submit();
25        }
26    });
27});

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.