96flo (обсуждение | вклад) Нет описания правки |
96flo (обсуждение | вклад) Нет описания правки |
||
| Строка 1: | Строка 1: | ||
if ( | document.addEventListener('DOMContentLoaded', function() { | ||
var searchButton = document.getElementById('citizen-search__buttonCheckbox'); | |||
} | if (searchButton) { | ||
searchButton.addEventListener('click', function() { | |||
var searchInput = document.querySelector('#searchform input[name="search"]'); | |||
if (searchInput) { | |||
searchInput.focus(); | |||
} | |||
}); | |||
} | |||
}); | |||
Версия от 02:28, 18 апреля 2025
document.addEventListener('DOMContentLoaded', function() {
var searchButton = document.getElementById('citizen-search__buttonCheckbox');
if (searchButton) {
searchButton.addEventListener('click', function() {
var searchInput = document.querySelector('#searchform input[name="search"]');
if (searchInput) {
searchInput.focus();
}
});
}
});