Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed the 'go to top' button to a circular button with an arrow on it #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ <h4>Join Our Newsletter</h4>
<a href="https://www.youtube.com/channel/UCInFaJ1OUf5UGl5soiO_8ng"><i class="fa fa-youtube-play" aria-hidden="true"></i></a>
<a href="https://t.me/codxcryptdsacp"><i class="fa fa-telegram"></i></a>
</div>
<button onclick="topFunction()" id="myBtn" title="Go to top">Go to Top</button>
<button onclick="topFunction()" id="myBtn">
<div class="arrow-style">&#8679;</div>
</button>
</div>
<p style="text-align:center;">Copyright @Copyright 2020 CodXCrypt Community | All rights reserved</p>

Expand Down
4 changes: 3 additions & 1 deletion blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ <h4>Join Our Newsletter</h4>
<a href="https://www.youtube.com/channel/UCInFaJ1OUf5UGl5soiO_8ng"><i class="fa fa-youtube-play" aria-hidden="true"></i></a>
<a href="https://t.me/codxcryptdsacp"><i class="fa fa-telegram"></i></a>
</div>
<button onclick="topFunction()" id="myBtn" title="Go to top">Go to Top</button>
<button onclick="topFunction()" id="myBtn">
<div class="arrow-style">&#8679;</div>
</button>
</div>
<p style="text-align:center;">Copyright @Copyright 2020 CodXCrypt Community | All rights reserved</p>

Expand Down
4 changes: 3 additions & 1 deletion contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ <h4>Join Our Newsletter</h4>
<a href="https://www.youtube.com/channel/UCInFaJ1OUf5UGl5soiO_8ng"><i class="fa fa-youtube-play" aria-hidden="true"></i></a>
<a href="https://t.me/codxcryptdsacp"><i class="fa fa-telegram"></i></a>
</div>
<button onclick="topFunction()" id="myBtn" title="Go to top">Go to Top</button>
<button onclick="topFunction()" id="myBtn">
<div class="arrow-style">&#8679;</div>
</button>
</div>
<p style="text-align:center;">Copyright @Copyright 2020 CodXCrypt Community | All rights reserved</p>

Expand Down
26 changes: 15 additions & 11 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion event.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ <h4>Join Our Newsletter</h4>
<a href="https://www.youtube.com/channel/UCInFaJ1OUf5UGl5soiO_8ng"><i class="fa fa-youtube-play" aria-hidden="true"></i></a>
<a href="https://t.me/codxcryptdsacp"><i class="fa fa-telegram"></i></a>
</div>
<button onclick="topFunction()" id="myBtn" title="Go to top">Go to Top</button>
<button onclick="topFunction()" id="myBtn">
<div class="arrow-style">&#8679;</div>
</button>

</div>
<p style="text-align:center;">Copyright @Copyright 2020 CodXCrypt Community | All rights reserved</p>

Expand Down
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,10 @@ <h4>Join Our Newsletter</h4>
<a href="https://www.youtube.com/channel/UCInFaJ1OUf5UGl5soiO_8ng"><i class="fa fa-youtube-play" aria-hidden="true"></i></a>
<a href="https://t.me/codxcryptdsacp"><i class="fa fa-telegram"></i></a>
</div>
<button onclick="topFunction()" id="myBtn" title="Go to top"><i class="fa fa-arrow-up" aria-hidden="true"></i></button>

<button onclick="topFunction()" id="myBtn">
<div class="arrow-style">&#8679;</div>
</button>
</div>
<p style="text-align:center;">Copyright &copy; 2020 CodXCrypt Community | All rights reserved</p>

Expand Down
15 changes: 14 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

5 changes: 4 additions & 1 deletion team.html
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,10 @@ <h4>Join Our Newsletter</h4>
<a href="https://www.youtube.com/channel/UCInFaJ1OUf5UGl5soiO_8ng"><i class="fa fa-youtube-play" aria-hidden="true"></i></a>
<a href="https://t.me/codxcryptdsacp"><i class="fa fa-telegram"></i></a>
</div>
<button onclick="topFunction()" id="myBtn" title="Go to top">Go to Top</button>
<button onclick="topFunction()" id="myBtn">
<div class="arrow-style">&#8679;</div>
</button>

</div>
<p style="text-align:center;">Copyright @Copyright 2020 CodXCrypt Community | All rights reserved</p>

Expand Down