js代码
<script src="js/jquery.anchorScroll.js"></script> <script type="text/javascript"> $(document).ready(function() { // Anchor Scroll $('.anchor-scroll').anchorScroll({ scrollSpeed: 800 // scroll speed }); $('.arrow-up').anchorScroll({ scrollSpeed: 1400, // scroll speed onScroll: function () { $(".fill-bg").fadeIn( "slow" ); $(".popup").text("Scrolling..."); }, scrollEnd: function () { $(".fill-bg").delay(1000).fadeOut( "slow" ); $(".popup").text("Done!"); } }); }); </script>