Closed crosslandwa closed 5 years ago
Hi Will,
I think you're missing the call to actually initialise the Frontend components…
<script>window.GOVUKFrontend.initAll()</script>
If you include this after you include the JavaScript, I believe the header should work as expected.
More information is in the installation docs
Actually, sorry, that might not be it…
If I try disabling JS on the components in the Design System I don't see the menu button. Your navigation links are also not rendering as expected (the bullets shouldn't be there)
Is this code public anywhere we could take a look?
Thanks @36degrees - adding that initialisation has fixed it
Also, with JS disabled (in the browser) I'm seeing the below (ie. no menu button):
Is that as expected?
Looks correct to me 👍
Great - thanks for your help. I'll close this issue
Repo steps
Using Chrome 71 (OS X) With the following css/js in my page:
And the following header/nav markup (
svg
element omitted for brevity):Expected On a narrow screen, the responsive menu collapses when the
menu
button is clickedActual Nothing happens when clicking
menu
Also When I swap out the 2.7.0.min.js to the version currently used by the Gov UK Design System page (https://design-system.service.gov.uk/javascripts/govuk-frontend-6774f05fd1e83b0846021758e67791fb.js) the menu minimises as expected
I'm also able to reproduce this using the currently provided header markup from the Header component from the https://design-system.service.gov.uk/components/header/ page