![]() |
Jquery mouse out still show sub nav if over
I'm trying to create a menu system with jQuery and i am stuck. any help would be appreciated. I have one main navigation and each item in it has a submenu to be displayed... I'm trying to make it so if you move the mouse over one of the items in the main menu, the sub menu for that item is shown so you can move your mouse over to the submenu and keep the styling "hovered" for the main menu item, allowing you to select a submenu item. If your mouse move off from all menu items, the complete menu is shown as what has a class of "active". I hope that makes sense. LOL
Code:
<!DOCTYPE html> |
I have always found it a boon in learning to study others code. Here are a bunch of jquery menus.
http://www.1stwebdesigner.com/css/35...igation-menus/ While jMenu seems to be the easiest and fastest, I find it jerky. good luck. |
Two suggestions for your existing code:
- structure your htthml so that the sub menus are nested within the top level menu lis - you can then use jQuery's DOM traversal - eg. .child() to find the sub menu - for the same reason, set your mouseover code to fire on the li, not the a element You can of course do this just with css, and then enhance it with some javascript animation if needed. |
| All times are GMT +1. The time now is 06:16 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.