Skip to content

Commit fb61e6d

Browse files
committed
Adding raphinesse's Fix: wrong scrollTop when scrolling without animation
1 parent 28558f9 commit fb61e6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

jquery.scrollIntoView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
function scrollTo(el, scrollTo) {
6565
if (opts.smooth) $(el).stop().animate({ scrollTop: scrollTo }, opts);
66-
else el.scrollTop = elY;
66+
else el.scrollTop = scrollTo;
6767
}
6868
return this;
6969
};

jquery.scrollIntoView.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)