Replace nav HTML with user input

JavaScript

const navHTML = `
all ur nav html stuff in here!
`

document.querySelector("nav").innerHTML = navHTML;
document.getElementById("nav-id").innerHTML = navHTML;
document.querySelector(".nav-class").innerHTML = navHTML;

initializeSearch?.();

/*
i found this somewhere i have no clue where, but it works for me! i also included the 3 different like thingies idk what theyre called im new to javascript LOL buttttt if you wanted it to be just the HTML nav tag you'd use the first one, or if you use the <nav> more than once on ur site and ur main nav has an id or class, youd use the other 2 ^_^ hopefully this is helpful, im not sure how to explain how it works bc idek how all i did was google what i wanted and this popped up somewhere LOL
*/