JQuery UI Tabs Causing Screen to “Jump”

后端 未结 17 1826
生来不讨喜
生来不讨喜 2020-11-30 22:22

I\'m using the latest version of the jQuery UI tabs. I have tabs positioned toward the bottom of the page.

Every time I click a tab, the screen jumps toward the top

17条回答
  •  误落风尘
    2020-11-30 22:55

    I found in my case the tab href=#example1 was causing the page to jump to the position of the id. Adding a fixed height to the tabs made no difference so I just added:

    $('.nav-tabs li a').click( function(e) { e.preventDefault(); });

提交回复
热议问题