How to find which JS triggers page scroll?

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.

11 views0 comments

Recent Posts

See All

Switch PHP version in Ubuntu & Apache

For example, if you are using the PHP 7.2 version and you are looking to switch the version to PHP 7.4. We need to update the PHP version in two places. CLI Apache 1. Switch PHP version in CLI Before