SCROLLIFY

使用鼠标滚轮或者手势滑动到页面节点部分


滑动鼠标滚轮

基本使用

需要引入 jQuery 1.6+ 以及缓冲动画插件jquery.easing.js.

	<! doctype html>
	<html>
		<head>
			<script>
				$(function() {
					$.scrollify({
						section : "section",
					});
				});
			</script>
		</head>
		<body>
			<section></section>
			<section></section>
		</body>
	</html>
				

配置

	$.scrollify({
		section : "section",
		sectionName : "section-name",
		easing: "easeOutExpo",
		scrollSpeed: 1100,
		offset : 0,
		scrollbars: true,
		before:function() {},
		after:function() {}
	});
				

选项设置

section
节点部分选择器.
sectionName
每一个section节点对应的data属性.
easing
定义缓冲动画.
offset
定义每个色彩tion节点的偏移量.
scrollbars
是否显示滚动条.
before
回调函数,滚动开始前触发.
after
回调函数,滚动完成后触发.

方法

滑动到指定的节点。

	$.scrollify("move","#name");