Treetops Central Coast Largest Zipline park in NSW
Get ready to bounce, climb and explore our newest attraction, Networld at Canberra Park. Book ahead now! Opening 23 March.
Treetops Adventure Western Sydney
We’re making adventure more accessible! Treetop Adventures now offers Afterpay, so you can experience the thrill of the treetops in 4 easy payments.
Treetops Central Coast Largest Zipline park in NSW
Get ready to bounce, climb and explore our newest attraction, Networld at Canberra Park. Book ahead now! Opening 23 March.
Treetops Adventure Western Sydney
We’re making adventure more accessible! Treetop Adventures now offers Afterpay, so you can experience the thrill of the treetops in 4 easy payments.
t; opacity: 1 !important; visibility: visible !important; }' + '').appendTo('head'); // Main click handler $('.elementor-nav-menu .menu-item-has-children > a').on('click',function (e) { e.preventDefault(); e.stopPropagation(); var $parentLi = $(this).parent(); var $submenu = $parentLi.find('> .sub-menu'); var menuLevel = $parentLi.parents('.sub-menu').length; // Close siblings at the same level only $parentLi.siblings('.menu-item-has-children').removeClass('menu-active'); // If this is a main level menu item, close other main level items if(menuLevel === 0) { $('.elementor-nav-menu > ul > .menu-item-has-children').not($parentLi).removeClass('menu-active'); } // Toggle current menu $parentLi.toggleClass('menu-active'); // Force display with jQuery if($parentLi.hasClass('menu-active')) { $submenu.show().css({ 'display': 'block', 'opacity': '1', 'visibility': 'visible' }); } else { $submenu.hide(); } // Update ARIA attributes for accessibility var isExpanded = $parentLi.hasClass('menu-active'); $(this).attr('aria-expanded',isExpanded); $submenu.attr('aria-hidden',!isExpanded); // Log for debugging var menuText = $(this).text().trim(); console.log('Menu clicked (Level ' + menuLevel + '):',menuText); }); // Special handling for deeply nested menu items $('.elementor-nav-menu .sub-menu .sub-menu .menu-item-has-children > a').on('click',function (e) { e.preventDefault(); e.stopPropagation(); var $parentLi = $(this).parent(); var $submenu = $parentLi.find('> .sub-menu'); // Close other third-level menus at the same level $parentLi.siblings('.menu-item-has-children').removeClass('menu-active'); // Toggle current third-level menu $parentLi.toggleClass('menu-active'); // Force display if($parentLi.hasClass('menu-active')) { $submenu.show(); } else { $submenu.hide(); } }); // Prevent ALL hover events on menu items EXCEPT for removing highlighted class $('.elementor-nav-menu').on('mouseenter','.menu-item',function (e) { // Remove highlighted class from all menu items $('.elementor-nav-menu .menu-item-has-children > a').removeClass('highlighted'); // Prevent any other hover effects e.stopImmediatePropagation(); }); $('.elementor-nav-menu').on('mouseleave','.menu-item',function (e) { e.preventDefault(); e.stopImmediatePropagation(); return false; }); // Allow normal link behavior for final menu items $('.elementor-nav-menu .sub-menu .menu-item:not(.menu-item-has-children) > a').on('click',function (e) { console.log('Navigation link clicked:',$(this).text().trim()); // Don't prevent default - let the link work normally }); // Close all menus when clicking outside $(document).on('click',function (e) { if(!$(e.target).closest('.elementor-nav-menu').length) { $('.elementor-nav-menu .menu-item-has-children').removeClass('menu-active'); $('.elementor-nav-menu .sub-menu').hide(); } }); // Prevent submenu area clicks from closing menus $('.elementor-nav-menu').on('click','.sub-menu',function (e) { e.stopPropagation(); }); // Handle keyboard navigation $('.elementor-nav-menu .menu-item-has-children > a').on('keydown',function (e) { if(e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); $(this).trigger('click'); } if(e.keyCode === 27) { $(this).parent().removeClass('menu-active'); $(this).parent().find('.sub-menu').attr('aria-hidden','true').hide(); } }); console.log('Menu system initialized with aggressive hover prevention'); });