Open kaittodesk opened 10 years ago
What you have said is easily to understand. The function window.scroll(10,10) means that the position of the document on the window moves to 10,10. while the function $(window).scrollLeft(20) is change the position on that condition before!
Don't know if it is a feature or a bug, but when scrollTop or scrollLeft is called on already scrolled window, it will reset value that was not changed.
For example:
The second line will change the scroll position from
10, 10
to20, 0
. I think it should change scroll position to20, 10
as it makes more sense, because the function name references to only one coordinate.What do you think? Should it be changed or is it working as intended?