Question

I code this page, a tab with sliding capability : here I really like the effect, but when you vien a long tab (let say specification), and we go to a smalll one (download) reclicking on a large one force the user to scroll down again...

Is it possible to jquery something that tell the page to stay scroll down at the max after the tab pressed ?

Was it helpful?

Solution

I'm doing something like this with the jQuery UI tabs, you can modify it for whatever layout:

//Tab panel height matching
$(".ui-tabs-panel").each(function() {
if ($(this).height() + 30 > $(this).parents(".subTabsC").height()) {
  $(this).parents(".subTabsC").height($(this).height() + 30);
}
});

I have the whole tab content wrapped in a <div class="subTabsC">. The 30 pixels in my case is to account for the tabs and the border, adjust to whatever you need.

OTHER TIPS

Yes. OnLoad you could iterate through all the tabs, find the tallest and set the container's height to that value and remove whatever's doing the smooth resizing.

It means some of the smaller things might look a little lost, but you'd not be resizing the page (which annoys me too).

couldn't you just add "return false" at the end of your function? this would prevent it from "refreshing" the page when you click the anchor link....I could be wrong...I'm just starting to learn jquery and javascript.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top