Results 1 to 8 of 8

Thread: AnyLink Vertical Menu

  1. #1
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink Vertical Menu

    Hi,

    I'm trying to use the AnyLink Vertical Menu in a website and it works fine. However, I have two questions:

    1. Can the drop down menu be vertically adjusted?
    2. Can the script be placed off-site in a script folder, adding a line like <script language="javascript" src="script/menu.js"></script> in the HEAD section?

    Thanks.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

    Regarding your question 1), can you clarify what you mean by "vertically adjusted?"

  3. #3
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry for not including the link, here it is:

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

    As to the vertical adjustment, I wanted to find out if I can place the drop-down a couple of pixels up or down.

    Thanks

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Certainly. To offset the vertical position of the menu slightly, up or down, find and edit this line:

    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+5+"px"

    The "+5" part is new, and would move the menu 5px down. You can use a negative integer to move it up instead.

  5. #5
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That works fine, thanks a lot!

    How about my other question?

    Thanks.

  6. #6
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    This is a follow-up question on the vertical adjustment. It works fine for drop-downs that actually open downward. However, drop-downs that open upward (drop-ups? :-)) show a noticable offset. Is there any way to set this offset independently?

    Thanks.

  7. #7
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Certainly. To answer both of your questions in one scoop, remove the original script and add the below code reference instead:

    Code:
    <script type="text/javascript" src="anylinkvertical.js">
    
    /***********************************************
    * AnyLink Vertical Menu- &#169; Dynamic Drive (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    Then, use anylinkvertical.js that's attached below. It lets you set the vertical offset for both when the menu is dropping down (default), and dropping up:

    Code:
    var verticaloffset=[10, -10] //vertical offset

  8. #8
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Works beautifully! Thanks a bunch!

    esm

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
  •