I am studying " Creating an Expanding Mega Menu"
https://support.wix.com/en/article/corvid-tutorial-creating-an-expanding-mega-menu#overview
and click this example go to the related website
I have some one qustion, where can I find the code in this website, such as
$w.onReady(async () => { //Get the menu data from the collection. menuData = await wixData.query("subTitles").find().then(result => result.items); //Set up each Submenu 2 repeater as it is loaded.for (let i = 1; i <= subLevel2RepeaterCount; i++) { $w(`#repeaterSubSub${i}`).onItemReady(($item, itemData, index) => { //Get the repeater button from its ID.const repeaterButton = $item(`#buttonSubLevelTwo${i}`) //Set the item label. repeaterButton.label = itemData.label; //Set the item link. repeaterButton.link = itemData.url; }); } });
Thank you !
If code is for your header or footer, it will be in the site tab as it applies to all your site and not on the page tab which is for that page only.
If you open up the example in your own Wix Editor, then the page will already be setup for you with all the elements on the page setup along with all the code in the page or site code tabs at the bottom of the Editor itself.
https://support.wix.com/en/article/corvid-working-in-the-code-panel