Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jovit-Mathew236 committed Oct 6, 2023
1 parent c4f24ea commit c5e4101
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions js/preloader.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
function preloader() {
setTimeout((e) => {
document.getElementById("preloader").classList.toggle("hidden");
TopScroll = window.pageYOffset || document.documentElement.scrollTop;
(LeftScroll = window.pageXOffset || document.documentElement.scrollLeft),
// if scroll happens, set it to the previous value
(window.onscroll = function () {
window.scrollTo(LeftScroll, TopScroll);
});
window.onscroll = function () {};
}, 4000);
TopScroll = window.pageYOffset || document.documentElement.scrollTop;
(LeftScroll = window.pageXOffset || document.documentElement.scrollLeft),
// if scroll happens, set it to the previous value
(window.onscroll = function () {
window.scrollTo(0, 0);
});
}

0 comments on commit c5e4101

Please sign in to comment.