scroll2Top—页面滚动jQuery插件

scroll2Top—页面滚动jQuery插件506
scroll2Top是一个简单的可定制的滚动页面的顶部jQuery插件。
使用方法

 <script src="js/jquery.1.11.0.min.js"></script>
  <script src="js/jquery.scroll2Top.min.js"></script>
CSS
  #to_the_top {
    display: none;
    position: fixed;
    cursor: pointer;
    /* modify below css to your needs */
    background: url('images/top.png') no-repeat left top;
    width: 60px;
    height: 60px;
    top: 240px;
    right: 50px;
  }
HTML
<div id="to_the_top"></div>
调用
 $("#to_the_top").scroll2Top();

也许你还喜欢