Category Archives: Accommodation

document.addEventListener('DOMContentLoaded', function () { function normalize(text) { return text .toLowerCase() .replace(/[’‘']/g, '') .replace(/[^a-z0-9]+/g, ' ') .trim(); } const slug = window.location.pathname .replace(/\/+$/, '') .split('/') .pop(); const propertyName = normalize(slug); document.querySelectorAll('select[name="menu-608"]').forEach(function (select) { const option = Array.from(select.options).find(function (option) { return normalize(option.text) === propertyName; }); if (option) { select.value = option.value; select.dispatchEvent(new Event('change', { bubbles: true })); } }); });