Hubspot adding unwanted javascript that interferes with custom navigation
SOLVE
We have a custom navigation on our client's hubspot site, but it recently became problematic. After troubleshooting the various scripts, enabling, disabling them, the problem was traced by to a javascript file being loaded with the site, that is not part of the site assets or in any of the folders:
Hubspot adding unwanted javascript that interferes with custom navigation
SOLVE
Unfortunately @roisinkirby, this is not a belch.io template. I do have a quick fix for this though. I believe that projects.js script is a standard HS script that's added to every template. The good news is that the script is targeting childrend directly of the "hs-menu-wrapper" class. So, a quick fix would be to drop this javascript into the template and then do a hard refresh in the browser.
Hubspot adding unwanted javascript that interferes with custom navigation
SOLVE
@lformdesign could you please share a link to the site you are working on and confirm if you are using custom coded templates, HubSpot's drag and drop templates or a template you purchased from the HubSpot Marketplace?
Hubspot adding unwanted javascript that interferes with custom navigation
SOLVE
@roisinkirbyThe template is original & custom coded by our team, we are not using any pre-fab templates or bits.
I can confirm that the fix suggested by @tjoyce works, much appreciated.
On Hubspot's end, it would be preferable however if setting flyouts='false' in the menu template function prevented that flyouts script from loaded altogether, or at least not initiate its event bindings. As it stands, that parameter seems to be more of a kind suggestion to the templating system rather than a hard setting. The fix @tjoyce came up with works but is a wee bit hacky in the context of the templating system.
Hubspot adding unwanted javascript that interferes with custom navigation
SOLVE
Thank you for the solution, @tjoyce! Our site is experiencing the same problem, however, the fix won't work because it interferes with our CSS. Does anybody have any other solutions? The site that I am currently experiencing problems with is https://www.wellable.co/seminars-webinars.
Hubspot adding unwanted javascript that interferes with custom navigation
SOLVE
Unfortunately @roisinkirby, this is not a belch.io template. I do have a quick fix for this though. I believe that projects.js script is a standard HS script that's added to every template. The good news is that the script is targeting childrend directly of the "hs-menu-wrapper" class. So, a quick fix would be to drop this javascript into the template and then do a hard refresh in the browser.
Hubspot adding unwanted javascript that interferes with custom navigation
SOLVE
Can you please look more into that issue? It breaked our site's critical navigation flyouts. Why this script is included without any possibility to disable it?