Help with responsive and javascript
Hi i need help with two things my website sometimes is responsive but other times not and ive got no clue why its doing this?
https://codepen.io/DevDaf-the-vuer/pen/wvRYoYK
2 Replies
And my javascript burger menu isnt working when i click on it nothing happens
the javascript burger button isn't working because there's just steps missing
1. You're looking for an element with ID navJava which doesn't exist
2. You aren't binding a click handler to the button
Also, could small points:
- Don't use
var
anymore, it should be treated as being deprecated
- Your button isn't a button, which isn't accessible. You should use the button element
- In your CSS, the first part of your media query sets .header-main
to display: none;
, but then you have a ton of styles for header-main
and its children that don't reset its display back to visible (and neither does your javascript)
additionally the button was broken in codepen because you had <script> tags in the JS box