Results 1 to 4 of 4

Thread: Drop down with Overlapping Content script

  1. #1
    Join Date
    Sep 2011
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Drop down with Overlapping Content script

    I wanted to use the following tooltip script on one of my pages:

    Drop down with Overlapping Content script

    My sample page contains a section with a vertical scroll.

    Each "Embassy" link within the government sections has been set to trigger the tooltip. However, the second government section and embassy link does not appear to trigger the tooltip to appear near the anchor link.

    What code would have to be modified in order for the tooltip to appear near the position of the anchor link at the time of the click?

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

    Default

    Untested, but inside dropdowncontent.js, try adding the code in red to the below line:

    Code:
    subobj.style.top=this.getposOffset(anchorobj, "offsetTop")+verticaloffset-document.getElementById('container').scrollTop+"px"
    It manually accounts for any scroll offset done inside your container "#container".
    DD Admin

  3. #3
    Join Date
    Sep 2011
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    The above insertion was helpful, but why is it necessary to click the second embassy link two times before the informational box appears on the screen? When the second appearance of the embassy link is clicked once, the screen flickers, and the second click causes the information box to appear as desired.

  4. #4
    Join Date
    Sep 2011
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I may have answered my own question. I noticed that I had one DIV in front of the script. I moved the script that initializes the informational box to the end of the code just before the end of the body, and I think it is okay now. Thanks for the adjustment to the code. Perhaps you should make the adjustment a standard part of the script that's posted on the site.

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
  •