How to find which JS triggers page scroll?
- Bilal Malik
- Apr 26, 2021
- 1 min read
On my site, whenever I clicked the checkbox that time ajax request called and scrolled a page. I was looking to find which javascript triggers the scroll action. I used the below method to find the js which triggers scroll.
Firstly, I loaded the page and placed the below javascript in the chrome developer console.
window.onscroll = function() {console.trace()};
Then I clicked the checkbox and it provides a list of js call trace in developer console.

Then I easily figured out the js which triggers scroll.
I hope it helps. Thanks.
Comments