Results 1 to 2 of 2

Thread: Ajax Tabs link from bottom of page

  1. #1
    Join Date
    Aug 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax Tabs link from bottom of page

    1) Script Title: Ajax Tabs Content Script (v 2.2)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tent/index.htm

    3) Describe problem: I'm using a div at the top of the page which is being loaded from a list of links at the bottom of the page ie:
    <li><a href="external.htm" rel="countrycontainer">Tab 2</a></li>

    The problem is that since this is a list of approx 20 links the top div is not visible on the page. Is there some way to ref an anchor to shift the page up upon loading the div?
    Thanks

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

    Default

    You can try adding inside the tab in question, specifically, its LI element, a code such as:

    Code:
    <li><a href="#" class="selected" rel="#default">Tab 1</a></li>
    <li onClick="this.scrollIntoView()"><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
    <li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li>
    This theoretically should cause the page to jump back to the top of the tab when clicked on. If that doesn't work, it may be because of the (long) delay before your Ajax content is fetched, causing the page's height to change only after the browser has already jumped to the top of the tab, throwing things off again. If so, you can try something else, but let me know if this works first.
    DD Admin

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
  •