实现回到顶部功能的jQuery插件:jQuery.toTop

m45y 9年前

jQuery.toTop 是一个轻量级的可定制的插件,实现回到顶部的功能。


1. At first include jQuery and jquery.toTop.js

<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>  <script src="jquery.toTop.min.js"></script>

2. Include HTML

  <a class="to-top">Top &uarr;</a>

You can add and style your element as you want

3. Activate the Plugin

  $('.to-top').toTop();

实现回到顶部功能的jQuery插件:jQuery.toTop

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