Results 1 to 8 of 8

Thread: Switch Menu- Javascript and CSS Question

  1. #1
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Question Switch Menu- Javascript and CSS Question

    Hi.

    I'm trying to configure this Switch Menu from the libary and I want that the submenus that contain only one link in it don't open up a submenu and just work as a straight link.
    The thing is that I want these links to look like the other ones and that there is no color change or underline on hoover.
    I'm trying for days now but can't manage to get it work.
    Please give me some advise.
    The menu is attached or can be seen here:

    Switch Menu

    The links in question are Menu 3, 5, 6, and 7.

    Thanks in advance,
    Cheng
    Cheng

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Script: Switch Menu
    http://www.dynamicdrive.com/dynamici...switchmenu.htm

    Hi John.

    I'm sorry about the credit to Dynamic Drive missing in the JS file.
    This was without any intention and I can't recall why it wasn't in there.
    Usualy I copy the whole code including the credits and create an external JS file from it.
    Anyway, this won't happen again.
    Please give me a hand on how to convert the links that contain only one link in the submenu to a straight link in the same style as the others that would be real nice.

    Thanks in advance and sorry about the missing credits,
    Cheng
    Cheng

  4. #4
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Cheng View Post
    I'm trying to configure this Switch Menu from the libary and I want that the submenus that contain only one link in it don't open up a submenu and just work as a straight link.
    If I am understanding your question correctly, this thread should help you out.

    http://www.dynamicdrive.com/forums/s...ead.php?t=8048

  5. #5
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    ......thanks for the link to this thread but I'm still stuck.
    Now I managed that one of the links don't open a submenu but I still can't make it a straight link which stays in the same style as the links that opens up a submenu.

    Code:
    <div class="menutitle" onclick="SwitchMenu()">Menu3</div>
    	<p><span class="submenu" id="sub"><br />
    	</span></p>
    What I need is that "Menu3" works as link but without underline or color change on hoover.
    This link should look like all the others.
    Is this possible?
    Cheng

  6. #6
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    ,,,,,,,in the attached Zip file you can see that I'm pretty close.
    Everything seems to be ok except for the link properties.
    Please someone tell me how I can get rid of the underline and the link color?
    And is it possible that if someone clicks on Menu3 that another open submenu is closed automaticially.........
    Cheng

  7. #7
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Cheng View Post
    Everything seems to be ok except for the link properties.
    Please someone tell me how I can get rid of the underline and the link color?
    Add this to your CSS file:

    Code:
    .submenu a{
    color:#000000;
    text-decoration: none;
    }

  8. #8
    Join Date
    Jan 2006
    Posts
    234
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    .......ok thanks I'll try it out and post back later if it worked out.
    Thanks again very much.......Cheng.......
    Cheng

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
  •