Results 1 to 4 of 4

Thread: Smooth Menu Click/Shadow probs.

  1. #1
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Smooth Menu Click/Shadow probs.

    1) Script Title: DD Smooth Navigational Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...smoothmenu.htm

    3) Describe problem: Okay, I did indeed do a forum search and came across a few topics on the problems I've been having, with no positive results.

    Basically I want the sub-menu to open on click, & close onclick, and close previously opened sub menus, if a different item is clicked. ( I do not have any secondary sub menu's).
    http://www.dynamicdrive.com/forums/s...ad.php?t=40170

    At first I tried the method this guy posted, and I couldn't get any of the sub-menus to close. Down the line I eventually figured you can just change 'hover' to 'click' and get the same affect. But still, none of them will close.
    This is my issue, having the menu's close, onclick. Whether it be the same menu, or a different one.

    Second issue is the shadow, even with the updated script (dec. 12) in Internet Explorer it leaves a box under the navigation after it has been closed (given I did the hover method, cause I can't get the click working).. I've read previous threads that this has been fixed, but it's not working for me?

    Thanks in advance

  2. #2
    Join Date
    Aug 2004
    Posts
    10,138
    Thanks
    3
    Thanked 1,007 Times in 992 Posts
    Blog Entries
    16

    Default

    Well, getting the sub menu to disappear onclick is fairly easy. As mentioned in this thread, just add the code in red below the existing line in black:

    Code:
    	$mainmenu.find("ul").css({display:'none', visibility:'visible'})
    	$mainmenu.find("ul").css({display:'none', visibility:'visible'}).click(function(e){
    		$(this).animate({height:'hide', opacity:'hide'}, ddsmoothmenu.transition.outtime)
    		this.parentNode.$shadow.stop().css({height:0})
    	})
    As far as getting the entire menu to react onclick (instead of onhover), there are subtle issues that make this more time consuming to do. I haven't tried Snookerman's mod yet, but this is probably something I can only consider doing the next time I update this script. For the time being if you're willing to use All Levels Menu instead, there is a mod for that which makes it react onClick: http://www.dynamicdrive.com/forums/s...ad.php?t=40787

    I'm aware of the shadow issue, which unfortunately is still there in IE6 (but not IE7). Until I can find a solution, one obvious workaround is just to disable the shadow effect.
    DD Admin

  3. #3
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I did as you said and it works when I click to open the first sub-menu. But if I click the same category it doesn't close the menu, or if I click a different category it doesn't close the previously opened menu.

    I tried Snookerman's mod and I get the same results. The menu just will not close onclick.

  4. #4
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Actually after having looked over Snookerman's mod I actually got the script to work.

    The menu opens, onclick.
    The menu closes, onclick.

    Then the menu happens to re-open, I have no idea whyyy.

    As far as getting the entire menu to react onclick
    I only want the first initial item (the category item) to be clickable, to where it opens and closes the menu.. from there sub-folders, sub-menu's can all stay with the onhover.
    Last edited by Cody J; 01-27-2009 at 02:17 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •