From 78902e0e96d9d9556529ea8001b29a3e02437bd2 Mon Sep 17 00:00:00 2001 From: a-muk Date: Fri, 1 Oct 2021 21:45:48 +0530 Subject: [PATCH] changed the go to top button to a circular button with an arrow in it --- about.html | 4 +++- blog.html | 4 +++- contact.html | 4 +++- css/style.css | 26 +++++++++++++++----------- event.html | 5 ++++- index.html | 5 ++++- js/main.js | 15 ++++++++++++++- team.html | 5 ++++- 8 files changed, 50 insertions(+), 18 deletions(-) diff --git a/about.html b/about.html index 3a9722e..d8d71fd 100644 --- a/about.html +++ b/about.html @@ -344,7 +344,9 @@

Join Our Newsletter

- +

Copyright @Copyright 2020 CodXCrypt Community | All rights reserved

diff --git a/blog.html b/blog.html index 7d3e7ee..8144de1 100644 --- a/blog.html +++ b/blog.html @@ -184,7 +184,9 @@

Join Our Newsletter

- +

Copyright @Copyright 2020 CodXCrypt Community | All rights reserved

diff --git a/contact.html b/contact.html index 30814a2..f25e51f 100644 --- a/contact.html +++ b/contact.html @@ -234,7 +234,9 @@

Join Our Newsletter

- +

Copyright @Copyright 2020 CodXCrypt Community | All rights reserved

diff --git a/css/style.css b/css/style.css index b77eb97..5a5c689 100644 --- a/css/style.css +++ b/css/style.css @@ -14837,24 +14837,28 @@ License Terms .blog-entry { #myBtn { display: inline; - position: fixed; - bottom: 20px; - right: 30px; - z-index: 99; - font-size: 18px; - border: none; - outline: none; - background-color: #ffc107; - color: white; cursor: pointer; - padding: 15px; - border-radius: 4px; + width:50px; + height:50px; + background-color: #ffc107; + border-radius:100px; + position:fixed; + bottom:50px; + right:40px; } #myBtn:hover { background-color: #FFCE39; } +.arrow-style{ + position:fixed; + bottom:40px; + right:45px; + font-size:40px;; +} + + /* Style the header */ .blogheader { diff --git a/event.html b/event.html index 2a59470..01aece6 100644 --- a/event.html +++ b/event.html @@ -236,7 +236,10 @@

Join Our Newsletter

- + +

Copyright @Copyright 2020 CodXCrypt Community | All rights reserved

diff --git a/index.html b/index.html index 158e1d6..0395afe 100644 --- a/index.html +++ b/index.html @@ -447,7 +447,10 @@

Join Our Newsletter

- + +

Copyright © 2020 CodXCrypt Community | All rights reserved

diff --git a/js/main.js b/js/main.js index acf5dea..85b3602 100644 --- a/js/main.js +++ b/js/main.js @@ -251,9 +251,22 @@ })(jQuery); +var mybutton = document.getElementById("myBtn"); + + +window.onscroll = function() {scrollFunction()}; + +function scrollFunction() { + if (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200) { + mybutton.style.display = "block"; + } else { + mybutton.style.display = "none"; + } +} // When the user clicks on the button, scroll to the top of the document function topFunction() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; - } \ No newline at end of file + } + diff --git a/team.html b/team.html index 0641cec..a6c457c 100644 --- a/team.html +++ b/team.html @@ -856,7 +856,10 @@

Join Our Newsletter

- + +

Copyright @Copyright 2020 CodXCrypt Community | All rights reserved