PDA

View Full Version : Ajax Tabs Content tutorial. Page jumps to top on Tab hyperlink



monaya
03-28-2009, 01:08 AM
I've implemented the ajax tabs using the tutorial:
http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/

but whenever you click on a tab the page jumps to the top. not all the way to the top though. It scrolls up to a certain part. Once it gets there it no longer jumps when you click the tab. It never happens when the tab opens an iframe. It only happens. you use the REL property of the a tag. The page jumps kind of similar to what happens when using the # as a hyperlink.

monaya
03-28-2009, 01:35 AM
Seems to be related to the fact that the tab div is inside a wrapper div. When it was not in a wrapper I did not have the problem.

ddadmin
03-28-2009, 01:45 AM
In what browser does this happen in? The script disables the actual link inside each tab, so it shouldn't act as a HTML anchor. Please post a link to the page on your site that contains the problematic script so we can check it out.

monaya
03-28-2009, 06:10 AM
I realized the bug or the issue. Whenever the browsers vertical scrollbar is all the way at the bottom and you click a tab, the page pops upward, pushing the scrollbar up a little. Playing with the padding-bottom on the wrapper divs are helping a little.