Oscarliu117 (Talk | contribs) |
Oscarliu117 (Talk | contribs) |
||
Line 66: | Line 66: | ||
</div> | </div> | ||
</div> | </div> | ||
+ | |||
+ | <script> | ||
+ | |||
+ | $(document).ready(function() { | ||
+ | $(window).scroll(function() { | ||
+ | if ($(this).scrollTop() >= 750) { | ||
+ | var position = $("#sidelist").position(); | ||
+ | if(position == undefined){} | ||
+ | else{ | ||
+ | $('#sidelist').css({"position": "fixed", "top": "145px", "margin-top": "0px"}); | ||
+ | } | ||
+ | } else { | ||
+ | $('#sidelist').removeAttr('style'); | ||
+ | } | ||
+ | }); | ||
+ | $(function(){ | ||
+ | $('i.fa-arrow-up').click(function(){ | ||
+ | $('html, body').animate({scrollTop:0},600); | ||
+ | return false; | ||
+ | }); | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | </script> | ||
+ | |||
</body> | </body> | ||
</html> | </html> | ||
{{NCKU_Tainan/footer}} | {{NCKU_Tainan/footer}} |
Revision as of 13:38, 14 September 2018