Advanced Search

Results 1 to 7 of 7

Thread: Multi level menu, that opens/closes on click

  1. #1
    Join Date
    Apr 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Multi level menu, that opens/closes on click

    Any one know of a menu similar to the suckerfish menu
    http://www.htmldog.com/articles/suckerfish/dropdowns/
    that opens/closes on a click instead of mouse hover?

    Thanks

    Idan

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    that would need to be a javascript activity, and cannot be done purely with css, which is the whole point of the suckerfish menu.

    http://www.dynamicdrive.com/dynamici...pmenuindex.htm

  3. #3
    Join Date
    Apr 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks. Yeh, the suckerfish is just an example I had of menu that works the same (from a user point of view).

    The link you gave me is great, but's only one level, and I need second one...

    I'll keep looking. Thanks for your help.

    Idan

  4. #4
    Join Date
    Apr 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    also the anylink menu, isn't very customizable...

  5. #5
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    there is a whole section of menu's... look in there for options, the anylink was just the first one I noticed

  6. #6
    Join Date
    Apr 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks, i'm trying to write me own..i'm a pretty novice....but i've run into a bit of trouble...

    i'm using an event listener to detect clicks on certain <a> tags.

    Code:
    		if(links[i].parentNode.parentNode.getAttribute("id") == "topLevel") {
    				Core.addEventListener(links[i], "click", clickMenu.topMenuListener);
    this calls

    Code:
    topMenuListener: function(event){
    		clickMenu.topShowMenu(this);
    		Core.preventDefault(event);
    	},
    which calls this:

    Code:
    	topShowMenu: function(link){
    
    		if(clickMenu.activeMid == true) {
    			Core.removeClass(link, "openMid");
    		}
    		else {
    //close all open mid and sub
    			//open mid
    			alert(link);
    			var menus = link.getElementsByTagName("ul"); //problem here
    			for(var i=0; i<menus.length; i++) {
    				if(menus[i].parentNode != this) {
    						alert(menus[i]);
    				Core.addClass(menus[i], "hide");
    				}
    				else
    					Core.addClass(menus[i], "showMid");
    			}
    			
    			
    			clickMenu.activeMid = true;
    		}
    	},
    I'm trying to get all the element children of the <a> that was clicked...but I think i'm doing something wrong...be cause the link.getElementsByTag("ul"); doesn't quite work....when I alert(link) I get the path of the document...

  7. #7
    Join Date
    Apr 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

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
  •