jQuery jQuery go to top 按鈕 (go to top button) Posted by JA Anything on 2016-09-28 <html> <div id=”top”>TOP</div> <css> #top{ position: fixed; right: 50px; bottom: 20px; } <script> $(‘#top’).click(function () { $(‘html,body’).animate({ ‘scrollTop’ : ‘0px’ }, 1000); });