Dropdown Navigation Tutorial

Files Needed

Right click on the below files and choose "Save Target As…" to save them to your computer.


dropdown-navigation.html

Open dropdown-navigation.html. Find:

<option value="index.html">Home</option>
<option value="links.html">Links</option>
<option value="updates.html">Updates</option>

Change "index.html" to the filename of the first page of your site. Change "Home" to the title of the page.

Do the same for the "Links" and "Updates" lines. You can add as many lines as you want to add more links.

Do not include a slash (/) at at the beginning of the filename.


dropdown-navigation.js

Open dropdown-navigation.js. Find:

var domain = "http://www.example.com/";

Change "http://www.example.com/" to your website address. Make sure to include the trailing slash (/) at the end.

If your website files are located in a sub-folder of the domain (for example, this page is located in the /coding/ sub-folder of my site), include the sub-folder in the address.

You do not need to change anything else on this page.


Dropdown Navigation Example