Drop Down Menus
hover-over or click a menu item
If you've ever wondered how to produce drop-downs from your main menus, this page shows the basics of what I use on the main site.
You can right click on this page and select 'View Source' (or similar). Then save the file as an html document. Experiment with it to your heart's content.
To understand what is going on in the code you will need a reasonable knowledge of html, css and javascript. The code also uses the jQuery javascript library, a remarkably useful and versatile collection of javascript tools. It has its own easy-to-use application programming interface (API) that looks strange at first, but is not difficult to learn.
You need to load the jQuery library into the script to make the menus work. This page's code includes it from an external source, which means you don't have to download any extra files to make it work. In your own scripts you may prefer to use your own downloaded jQuery javascript file.
The source code is well documented, with plenty of comments. My apologies but I am currently too short of time to answer questions on coding. There are many excellent tutorials on the internet, here are some recommendations ....
html, javascript, css, jQuery - w3schools
jQuery - jQuery