我正在尝试利用 Ascensor JQuery 插件构建一个单页滚动网站,但在正确设置它时遇到了很多麻烦。http://kirkas.ch/ascensor/上的文档很有帮助,但我仍然必须遗漏一些东西。我想要的是一个简单的三层布局,从上到下。似乎我的“建筑物”的布局生成正确,但我无法在“级别”之间移动。箭头键和我的链接根本不移动页面。我可以得到一些关于我的代码的帮助吗?任何指导表示赞赏。
谢谢,布雷特
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Ascensor Test</title>
<script src="jquery-1.9.1.js"></script>
<script src="jquery.scrollTo-1.4.3.1.js"></script>
<script src="jquery.ascensor.js"></script>
<script src="jquery.easing.1.3.js"></script>
<script>
$(document).ready(function()
{
$('#house').ascensor(
{
AscensorName:'ascensor',
ChildType:'div',
AscensorFloorName:'Home | Implementation | HTML',
Time:1000,
Easing:'easeInOutCubic',
WindowsOn:1,
Direction:'y',
AscensorMap:'1|1 & 2|1 & 3|1',
KeyNavigation: true,
Queued:false,
QueuedDirection:"x"
});
});
</script>
<style>
body
{
margin: 0;
padding: 0;
}
#house
{
overflow: hidden;
border: 5px solid black;
}
#navigation
{
z-index: 1000;
position: fixed;
top: 50px;
left: 50px;
}
#ascensorFloor1
{
background-color: orange;
}
</style>
</head>
<body>
<div id="navigation">
<a href="#" class="ascensorLink ascensorLink1">Floor 1</a>
<a href="#" class="ascensorLink ascensorLink2">Floor 2</a>
<a href="#" class="ascensorLink ascensorLink3">Floor 3</a>
</div>
<div id="house">
<div>
Floor 1
</div>
<div>
Floor 2
</div>
<div>
Floor 3
</div>
</div>
</body>
</html>