From eb8fa56fd24b299eeb4df6f55ec72e9be17e12da Mon Sep 17 00:00:00 2001 From: activelearner7 Date: Sun, 23 Oct 2022 11:44:18 +0530 Subject: [PATCH] Have fixed the scrolling issue on mobile --- Home.html | 11 ++++++++++- feedbackform.html | 15 ++++++++++++--- feedbackformsubmitted.html | 17 +++++++++++++---- forgetPass.html | 15 ++++++++++++--- form-correction.html | 15 ++++++++++++--- help.html | 15 ++++++++++++--- index.html | 11 ++++++++++- login.html | 15 ++++++++++++--- sign-up.html | 15 ++++++++++++--- 9 files changed, 105 insertions(+), 24 deletions(-) diff --git a/Home.html b/Home.html index 1a6e1df..19b49de 100644 --- a/Home.html +++ b/Home.html @@ -2294,8 +2294,17 @@

Integrity Pledge } } + function detectMob() { + return ( ( window.screen.width <= 600 ) && ( window.screen.height <= 950 ) ); + } + $("#scrollToTopButton").click(function () { - $('html ,body').animate({ scrollTop: 0 }, 800) + if (detectMob()){ + $('html ,body').animate({ scrollTop: 0 }, 1); + } + else { + $('html ,body').animate({ scrollTop: 0 }, 800); + } }); }); diff --git a/feedbackform.html b/feedbackform.html index c98196d..5018b27 100644 --- a/feedbackform.html +++ b/feedbackform.html @@ -655,9 +655,18 @@

Integrity Pledge } } - $("#scrollToTopButton").click(function(){ - $('html ,body').animate({scrollTop : 0},800) -}); + function detectMob() { + return ( ( window.screen.width <= 600 ) && ( window.screen.height <= 950 ) ); + } + + $("#scrollToTopButton").click(function () { + if (detectMob()){ + $('html ,body').animate({ scrollTop: 0 }, 1); + } + else { + $('html ,body').animate({ scrollTop: 0 }, 800); + } + }); }); diff --git a/form-correction.html b/form-correction.html index 835c8ff..7bf2db0 100644 --- a/form-correction.html +++ b/form-correction.html @@ -2103,9 +2103,18 @@

Integrity Pledge } } - $("#scrollToTopButton").click(function(){ - $('html ,body').animate({scrollTop : 0},800) - }); + function detectMob() { + return ( ( window.screen.width <= 600 ) && ( window.screen.height <= 950 ) ); + } + + $("#scrollToTopButton").click(function () { + if (detectMob()){ + $('html ,body').animate({ scrollTop: 0 }, 1); + } + else { + $('html ,body').animate({ scrollTop: 0 }, 800); + } + }); }); diff --git a/help.html b/help.html index 6689a91..828a5ed 100644 --- a/help.html +++ b/help.html @@ -566,9 +566,18 @@

Integrity Pledge } } - $("#scrollToTopButton").click(function(){ - $('html ,body').animate({scrollTop : 0},800) -}); + function detectMob() { + return ( ( window.screen.width <= 600 ) && ( window.screen.height <= 950 ) ); + } + + $("#scrollToTopButton").click(function () { + if (detectMob()){ + $('html ,body').animate({ scrollTop: 0 }, 1); + } + else { + $('html ,body').animate({ scrollTop: 0 }, 800); + } + }); }); diff --git a/login.html b/login.html index 92018f5..df4f10f 100644 --- a/login.html +++ b/login.html @@ -756,9 +756,18 @@

Integrity Pledge } } - $("#scrollToTopButton").click(function(){ - $('html ,body').animate({scrollTop : 0},800) -}); + function detectMob() { + return ( ( window.screen.width <= 600 ) && ( window.screen.height <= 950 ) ); + } + + $("#scrollToTopButton").click(function () { + if (detectMob()){ + $('html ,body').animate({ scrollTop: 0 }, 1); + } + else { + $('html ,body').animate({ scrollTop: 0 }, 800); + } + }); });