Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jan 2005
    Posts
    189
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Simple Javascript Menu

    Okay, I can't believe I can't find this (I've searched, yes!) but I want a very basic javascript menu that I can attach to my images.

    So, I've got my nav images in a vertical row on the left hand side of the page, and when I rollover I just want a submenu to appear to the right which I can add more sections too. Does anyone know off the top of their head something that would do the trick for me? I would really appreciate it. Thanks!

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    HVMenu allows you to use images (rollovers) for the links and can have as many submenus as you want.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Posts
    189
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Thanks, that's exactly what I was looking for!

    Is there any way to have it move with the page, for instance if my webpage is centered, to have it stay over the same spot on the page when the user resized the browser?

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Not sure what you mean, but you can use either relative or absolute positioning with that one. Read the README type file that comes with. It says how to do that.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #5
    New Coder
    Join Date
    Apr 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Yes, you can...I think

    look for this line...
    Code:
    	var TargetLoc='';  // span id for relative positioning
    in exmplmenu_var.js. Change the '' to 'movingSpan'. In your web page add...
    Code:
    <span id='movingSpan' style='positon:reletive'></span>
    That should work.

  • #6
    Regular Coder
    Join Date
    Jan 2005
    Posts
    189
    Thanks
    6
    Thanked 0 Times in 0 Posts
    NimbusSoftware, I made a couple tweaks to your code, but that worked perfectly! Thank you so much!


  •  

    Posting Permissions

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