Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 373527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:19:01+00:00 2026-05-12T14:19:01+00:00

Greetings! I am interested to your feedback regarding best practices for handling a website

  • 0

Greetings! I am interested to your feedback regarding best practices for handling a website menu system using modern methods (jQuery?).

The old way (in place currently):

<div id="menu">
  <ul>
    <li class="navHotel"><a href="#" onmouseover="MM_showHideLayers('hotel','','show','tour','','hide','location','','hide','attractions','','hide','dining','','hide')">hotel</a></li>
    <li class="navTour"><a href="#" onmouseover="MM_showHideLayers('hotel','','hide','tour','','show','location','','hide','attractions','','hide','dining','','hide')">take a tour</a></li>        
    <li class="navLocation"><a href="#" onmouseover="MM_showHideLayers('hotel','','hide','tour','','hide','location','','show','attractions','','hide','dining','','hide')">location</a></li>
    <li class="navAttractions"><a href="#" onmouseover="MM_showHideLayers('hotel','','hide','tour','','hide','location','','hide','attractions','','show','dining','','hide')">attractions</a></li>
    <li class="navDining"><a href="#" onmouseover="MM_showHideLayers('hotel','','hide','tour','','hide','location','','hide','attractions','','hide','dining','','show')">dining</a></li>
  </ul>

As you can see each nav link shows and hides various DIVs (sub menus) based onmouseover. Each page in the site must have a different initial sub-menu/DIV state so I have additional onmouseover triggers connected to various DIVs so if the visitor move the mouse to other parts of the page, the original menu states ‘snap’ back:

<div id="leftColumn1" onmouseover="MM_showHideLayers('hotel','','hide','location','','hide','attractions','','hide','dining','','hide')">

I know my methodology blows and there are other better methods/techniques for handling this.

To summarize, I’m looking for:

1) A centralized management of the menu system code (I’m using INCLUDE now which I hope is proper)
2) A better method for handling the mouseovers and the display of the submenus.
3) A better method of handling the ‘snap’ back effect when the mouse is moved away from the menu area.

Thanks in advance for your feedback! Have a great day!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:19:01+00:00Added an answer on May 12, 2026 at 2:19 pm

    You should try using jQuery and giving each menu item a class instead of polluting the markup with loads of onclicks.

    Using jQuery, you can simply use the class or id of each menu item and write the functionality for the mouseovers, clicks etc.. in a jQuery function, the beauty of which will separate behaviours out of the semantic markup where it is currently misplaced.

    the tutorials at http://docs.jquery.com/Tutorials are easy to follow and the language is very easy to learn. Start reading through and have a go.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings, I'm using https://github.com/blueimp/jQuery-File-Upload (downloaded the version as of 5/21/2011) along with ASP.NET MVC3.
Greetings all, I'm trying to localize a .NET/C# project. I'm using string resource files
Greetings, I'm trying to prevent XSS and improper html from input fields using CKEditor
Greetings, I'm confused as to the best approach to make when consuming REST based
Greetings - Struggeling with a three-level css menu. Works fine in FireFox and Opera
Greetings, By using the regular selector, I am able to select the grand parent
First off, greetings everyone and thank you for your interest in my question. I'm
Greetings! I am working on an AS2 website with MovieClips for pages that swap
Greetings. I am interested in writing an emulator for some old computer. However, I'd
Greetings all. I am writing some code using the Boost Units library and have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.