Jump to content

Need help with html include file & drop-down navbar


Recommended Posts

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 post
Share on other sites

Pls post the relevant part of your code using the code tags <>.

Link to post
Share on other sites

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...