Line 9: | Line 9: | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | ||
+ | |||
+ | <link rel="alternate stylesheet" type="text/css" href="scroll_style.css"> | ||
+ | <script type="text/javascript" src="jquery.js"></script> | ||
+ | <script type="text/javascript" src="scroll_script.js"></script> | ||
+ | |||
+ | |||
<style> | <style> | ||
Line 131: | Line 137: | ||
+ | #wrapper | ||
+ | { | ||
+ | text-align:center; | ||
+ | margin:0px auto; | ||
+ | padding:0px; | ||
+ | width:700px; | ||
+ | } | ||
+ | #scrollToTop | ||
+ | { | ||
+ | position:fixed; | ||
+ | left:45%; | ||
+ | bottom:50px; | ||
+ | border:3px solid #585858; | ||
+ | background-color:white; | ||
+ | color:#585858; | ||
+ | border-radius:100%; | ||
+ | height:45px; | ||
+ | width:45px; | ||
+ | font-size:40px; | ||
+ | display:none; | ||
+ | } | ||
</style> |
</style> | ||
Line 234: | Line 261: | ||
<p>This is overview about Toehold Switch.</p> | <p>This is overview about Toehold Switch.</p> | ||
+ | <a href="#" input type="button" id="scrollToTop" onclick="scrolltop();">⇧</a> | ||
</div> | </div> | ||
Line 240: | Line 268: | ||
<h1>Interlab</h1> | <h1>Interlab</h1> | ||
<p>This is overview about Interlab.</p> | <p>This is overview about Interlab.</p> | ||
− | + | ||
+ | <a href="#" input type="button" id="scrollToTop" onclick="scrolltop();">⇧</a> | ||
+ | |||
</div> | </div> | ||
Line 255: | Line 285: | ||
</ul> | </ul> | ||
<br> | <br> | ||
+ | |||
+ | <a href="#" input type="button" id="scrollToTop" onclick="scrolltop();">⇧</a> | ||
</div> | </div> | ||
Line 262: | Line 294: | ||
<p>This is overview about Program.</p> | <p>This is overview about Program.</p> | ||
+ | <a href="#" input type="button" id="scrollToTop" onclick="scrolltop();">⇧</a> | ||
</div> | </div> | ||
+ | <script> | ||
+ | |||
+ | $(document).ready(function(){ | ||
+ | $(window).scroll(function(){ | ||
+ | if ($(window).scrollTop() > 100) { | ||
+ | $('#scrollToTop').fadeIn(); | ||
+ | } else { | ||
+ | $('#scrollToTop').fadeOut(); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | function scrolltop() | ||
+ | { | ||
+ | $('html, body').animate({scrollTop : 0},500); | ||
+ | } | ||
+ | </script> | ||
<div class="column half_size" > | <div class="column half_size" > |
Revision as of 13:10, 4 August 2017