A dynamic HTML page scrolling down

2019-08-17 02:28发布

I have a dynamic HTML page built with bootstrap, jqxGrid, calling some server side code to get data. After loading the data, jqxGrid populated, the page scrolls down.

Getting the code from a different developer, not sure where/what caused the page scrolling down.

I searched keyword "scroll" and did not find anything.

My question is a general question: what kind of JS code/css could lead the page to scroll down?

Thanks!

2条回答
一纸荒年 Trace。
2楼-- · 2019-08-17 03:23

Look for something like:

<a href="#anchor">Link Text</a>

in your html code and quite possibly some javascript that is accessing it and causing the scroll.

查看更多
Ridiculous、
3楼-- · 2019-08-17 03:29
$("html, body").animate({scrollTop: "2500"}, 1000); //smooth scrolling 2500px down

Of course you can scroll to whatever element in your html by writing:

scrollTop: $(element).offset().top
查看更多
登录 后发表回答