日期:2013-4-17 来源:GBin1.com
Scrollup是一款jQuery的“回到页面顶端”的插件,能够帮助你快速的实现一个完全自定义的“back to top"的功能。
主要参数:
-
scrollName: 'scrollUp', // Element ID
-
topDistance: '300', // Distance from top before showing element (px)
-
topSpeed: 300, // Speed back to top (ms)
-
animation: 'fade', // Fade, slide, none
-
animationInSpeed: 200, // Animation in speed (ms)
-
animationOutSpeed: 200, // Animation out speed (ms)
-
scrollText: 'Scroll to top', // Text for element
-
activeOverlay: false, // 这个属性对于开发者来说可能比较有用,帮助你定位“回到顶端”按钮出现时滚动到的页面位置。
使用代码
$(function () {
$.scrollUp({
scrollName: 'scrollUp', // Element ID
topDistance: '300', // Distance from top before showing element (px)
topSpeed: 300, // Speed back to top (ms)
animation: 'fade', // Fade, slide, none
animationInSpeed: 200, // Animation in speed (ms)
......
网站地址:http://markgoodyear.com/2013/01/scrollup-jquery-plugin/