Keeping tabs with "a href=#sometabname" from scrolling to the anchor with jQuery
I have a set of vertic开发者_开发知识库al tabs about a quarter of the way down my page. They are all visible on page load from the top of the browser window. When you click on a tab, it scrolls down and puts the tab content at the top of the window. I know why it does this, is there anyway to override this behavior so that the tabs change content but the window does not scroll? Thanks, Kane
return false
or use preventDefault();
Here's an example for you: http://jsfiddle.net/tUaqw/
Figured it out was a issue with the UI, can't give the anchor and the tab itself the same ID. Thanks for your help, yours is the way it should work!
精彩评论