PDA

View Full Version : Flex Level Drop Down Menu - How to use Click rather than Mouseover



karin42
01-13-2010, 06:37 PM
1) Script Title: Flex Level Drop Down Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/flexdropdown.htm

3) Describe problem:


I would like to make the menu be Click rather than mouseover.

I only want to go to a page when the user gets to the last level.

How do I do this?

URL: http://www.comedydog.com/index.php

Thank you so much for the menu and for all your help!

-Karin

ddadmin
01-14-2010, 06:02 AM
Are you looking for just the initial main menu to be triggered onClick, when the user clicks on the anchor link, or every level within the main menu as well? For the former, that's easy to do. Inside the .js file, just replace:


$target.bind("mouseenter", function(e){
$flexmenu.css('zIndex', ++flexdropdownmenu.startzindex)
flexdropdownmenu.positionul($, $flexmenu, e, $target)
flexdropdownmenu.showbox($, $flexmenu, e)
})


with:


$target.bind("click", function(e){
$flexmenu.css('zIndex', ++flexdropdownmenu.startzindex)
flexdropdownmenu.positionul($, $flexmenu, e, $target)
flexdropdownmenu.showbox($, $flexmenu, e)
e.preventDefault()
})


I only want to go to a page when the user gets to the last level.

Why not just set the URL for every one of the other links inside the menu to say "#"?