jQuery(function ($) { // Getting links from a page and turning them into a scroll-spy bespoke menu // FIXME when page loads with #... in url, the scroll spy gets messed up. let links; links = document.querySelectorAll("#one, #two, #three") let url = window.location.href; let innerContent = ""; links.forEach(link => { let fullUrl = url + "#" + link.id; innerContent += "