开发者

Jquery Pagination Top anchor tag on page change

I have the Jquery Pagination script working with the Nav bar at the top as well as the bottom. When I change pages at the bottom I want the page to scroll back to the top but the _top anchor isn't working nor is a link to the开发者_如何学Go content ID.

Here is my code: http://jsbin.com/amici3/2

The pagination works properly however when I put this page together for this example the bottom and top pagination menus don't stay in sync...however they do in the real set of pages.

Any ideas? Thanks!


As you are already using jquery, this should work for you:

$("html").scrollTop(0);

or

$("body").scrollTop(0);

Adding this to your callback will cause jquery to scroll you to the top of the page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜