Answer the question
In order to leave comments, you need to log in
How to implement a progress bar using js when scrolling a div element?
Suppose there is a page on which not the "body" element is scrolled, but a certain "div", how can I implement a horizontal progress bar when scrolling? I used different libraries, but they did not help because they calculated the scroll position through the "body".
Answer the question
In order to leave comments, you need to log in
or do it yourself so life doesn't look like honey
.scrollTop()
Returns: Integer
Gets the left scroll padding value for the first element in the set.
.scrollTop(Value)
Returns: jQuery
Sets the left scroll padding value for all elements in the set.
axis from there taken https://ruseller.com/jquery.php?id=57
and css about the same :D : htmlbook.ru/blog/polzovatelskie-skrollbary-v-webkit
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question