mjs9361 Posted January 30, 2020 Share Posted January 30, 2020 Hello, I'm revising an old website for a client and trying to use html includes per w3schools (https://www.w3schools.com/howto/howto_html_include.asp). In one of the include files I have the responsive dropdown menu code (https://www.w3schools.com/howto/howto_js_responsive_navbar_dropdown.asp). Everything was working great with the menu until I moved it into the include file; now in the mobile view, the menu doesn't appear on click. Can anyone tell me, does putting dropdown menu code not work in an include file? I can attach code if needed. Mary Jo Link to comment Share on other sites More sharing options...
niche Posted January 30, 2020 Share Posted January 30, 2020 include as in php? Link to comment Share on other sites More sharing options...
mjs9361 Posted January 30, 2020 Author Share Posted January 30, 2020 (edited) no, I'm using html as in the link update ... code is attached include-code.txt Edited January 31, 2020 by mjs9361 Link to comment Share on other sites More sharing options...
niche Posted January 31, 2020 Share Posted January 31, 2020 Pls post the relevant part of your code using the code tags <>. Link to comment Share on other sites More sharing options...
Ingolme Posted February 2, 2020 Share Posted February 2, 2020 Javascript does not work in HTML includes, you have to load the Javascript sections including the onclick event from their own .js file using <script> tags. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now