You can suggest to me in Js or Jquery are fine.
Thank you for any suggestions.
You can use the below code :
But documentElement not working in chrome. Chrome uses the body for keeping track of scrolling.
So to get the current position, you can :
var currenPosition = document.documentElement.scrollTop || document.body.scrollTop;
If you use Jquery you can do as below:
var currenPosition = $(window).scrollTop();
You can see a demo code here.Sandeep Kumar Apr 21 2020