views:

505

answers:

1

I'm working on a page that uses jQuery tabs. It's pretty much completed, but I've run into one minor annoyance. If the content of the tab is longer than the available window height, it automatically scrolls down to the start of the content. This makes sense, since behind the screens it's just an tag pointing to the id of the content. However, this is fairly annoying since now you have to scroll up to see the tab bar.

I've tried to add window.scroll(0, 0) to the tabsshow event, but that didn't do anything.

Does anyone happen to know a way to stay at the top of the page when a jQuery tab is clicked?

A: 

Fixed it. The problem was not with jQuery, but with trying to draw a jsCharts graph with no data which apparently causes the document to scroll.

FalconNL