Oscarliu117 (Talk | contribs) |
Oscarliu117 (Talk | contribs) |
||
Line 209: | Line 209: | ||
</div> | </div> | ||
</div> | </div> | ||
+ | |||
+ | <script> | ||
+ | $(document).ready(function () { | ||
+ | $(window).scroll(function () { | ||
+ | if ($(this).scrollTop() >= 90) { | ||
+ | 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 15:19, 2 October 2018