Aymanshafei (Talk | contribs) |
Aymanshafei (Talk | contribs) |
||
Line 245: | Line 245: | ||
</div> | </div> | ||
</section> | </section> | ||
− | <button | + | <button id="myBtn" title="Go to top">👆</button> |
<script src="https://2017.igem.org/Template:AFCM-Egypt/owl.carouseljs/javascript?action=raw&ctype=text/javascript"></script> | <script src="https://2017.igem.org/Template:AFCM-Egypt/owl.carouseljs/javascript?action=raw&ctype=text/javascript"></script> | ||
− | |||
− | |||
<script> | <script> | ||
$(document).ready(function() { | $(document).ready(function() { | ||
+ | $('#myStn').click(function(){ | ||
+ | document.body.scrollTop = 0; | ||
+ | document.documentElement.scrollTop = 0; | ||
+ | }) | ||
+ | window.onscroll = function () { scrollFunction() }; | ||
+ | function scrollFunction() { | ||
+ | if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { | ||
+ | document.getElementById("myBtn").style.display = "block"; | ||
+ | } else { | ||
+ | document.getElementById("myBtn").style.display = "none"; | ||
+ | } | ||
+ | } | ||
+ | |||
document.getElementById('navbar-toggle').onclick = function () { | document.getElementById('navbar-toggle').onclick = function () { | ||
var active = document.querySelector(".navbar-collapse"); | var active = document.querySelector(".navbar-collapse"); |
Revision as of 12:34, 27 October 2017
Abstract