Thanks Klaus, I added your code to my example and I still can't make it work as I want.
The screen is scrolling to the top when a tab is clicked. I have equal content inside each tab. Here is my simple example. Please take a look. http://5bosses.com/examples/tabs/sample_tabs.html Am I doing something wrong? Nicky's works, so I must have made some error. On Oct 30, 5:07 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Well, that doesn't seem to be an error but standard browser behavior. > If you switch to a tab that causes the page to not have a scrollbar, > the tabs appear to jump because the browser must rerender the page in > a way as if the scrollbar were moved to the top. The browser just > can't do anything else. > > The only way to solve this is to give all tab panels the same height. > This is not always desirable though, thus it won't become standard > behavior but could be solved by yourself. Here's a little tabs > extension that does it: > > $.extend($.ui.tabs.prototype, { > equalize: function() { > var heights = this.$panels.map(function() { > return $(this).height(); > }) > .get() > .sort(function(a, b) { > return b - a; > }); > // set all panels to highest height > this.$panels.css('height', heights[0]); > } > > }); > > Usage: > > $('#container-1 > ul').tabs().tabs('equalize'); > > --Klaus > > On 30 Okt., 21:56, Nicky <[EMAIL PROTECTED]> wrote: > > > I think I know what's wrong with the Tabs-script, but not where and > > what needs to be done. > > > The problem seems to be tabs that contains less text and doesn't need > > the vertical scrollbar. > > When you have both large and small tabs the error occurs. > > > See this page for more info:http://www.sandstream.se/tabs_test3.html