Tạo nút Scroll to Top với jQuery cho Website

Code chèn trước thẻ </body>

<div id="topcontrol" title="Scroll to Top"><i class="fa fa-angle-up fa-lg fa-angle-style"></i></div>
 if ($(this).scrollTop() > 100) {
 } else {
 $('html, body').animate({scrollTop: '0px'}, 800);
 return false;

Demo: http://g-shock.vn


So empty here ... leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.