Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > PHP/MySQL/Scripting

  • Print
  • + Share This
Like this article? We recommend

Tips

  • Everything within the <DIV> tag ends up as an option on the pull-down menu. While this example shows how to have both URLs and JavaScript commands as menu options, you can also use this as navigation within your site--just use links to alternate Web pages.

  • The page loads with the menus actually positioned so that most of the menu is above the top edge of the browser window. Rolling over a menu causes the whole menu to slide down so that the entire menu is visible. That's why this technique is only usable if you begin with the menu at the top or side of the browser window; you can't use this kind of a menu in the middle of a page.

  • The conditionals in this script are in the format x = (a) ? b : c. The above example would be read as "if a, then set x to b, else set x to c". It's a simple way to turn six lines of code into one.

  • + Share This
  • 🔖 Save To Your Account