实现“返回顶部”功能的jQuery插件:ScrollUp

jopen 12年前

ScrollUp 是一个轻量级的 jQuery 插件,轻松实现了滚动页面的 “返回顶部” 的功能。

在线演示:http://markgoodyear.com/labs/scrollup/

实现“返回顶部”功能的jQuery插件:ScrollUp

示例代码:

$(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)          animationOutSpeed: 200, // Animation out speed (ms)          scrollText: 'Scroll to top', // Text for element          activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'      });    });

项目主页:http://www.open-open.com/lib/view/home/1361147514744