[英]How to solve my jquery plugin issue?
I am trying to use a Jquery plugin called ancesor 我正在尝试使用名为ancesor的Jquery插件
I have something like the following: 我有以下内容:
<nav class='navbar navbar-default' role='navigation '>
<ul class='alinks list-inline links-to-floor'>
<li class="list-group-item"><a href='#'>link1</a></li>
<li class="list-group-item"><a href='#'>link2</a></li>
<li class="list-group-item"><a href='#'>link3</a></li>
<li class="list-group-item"><a href='#'>link4</a></li>
<li class="list-group-item"><a href='#'>link5</a></li>
</ul>
</nav>
<div id='ascensorBuilding'>
<div class='ascensorFloor1' >
test here
</div>
<div class='ascensorFloor2' >
blog hree oooo
</div>
<div class='ascensorFloor3' >
aaagg
</div>
<div class='ascensorFloor4' >
dddd
</div>
<div class='ascensorFloor5' >
ddd
</div>
</div>
<script src="/includes/lib/jquery-1.8.0.min.js"></script>
<script src="/includes/lib/jquery.ascensor.min.js"></script>
<script src="/includes/lib/bootstrap/js/bootstrap.min.js"></script>
<script>
var ascensor = $('#ascensorBuilding').ascensor({
AscensorName: 'ascensor',
ChildType: 'div',
AscensorFloorName: '1.0 | 1.1 | 1.3 | 4.3 | 5.4 | 5.5 | 5.6 | 7.6 | 8.6 | 8.7 | 8.8 | 8.9 | 10.2',
Time: 9000,
WindowsOn: 1,
Direction: "chocolate",
AscensorMap: '1|1 & 2|1 & 3|1 & 3|2 & 3|3 & 4|3 & 5|3 & 3|4 & 3|5 & 4|5 & 5|5 & 6|5 & 3|6',
Easing: 'easeInOutQuad',
KeyNavigation: true,
Queued: false,
QueuedDirection: "y"
})
$(".alinks li").click(function(event, index) {
ascensor.trigger("scrollToStage", $(this).index());
});
My webpage doesn't seem to apply the parameters I pass. 我的网页似乎没有应用我传递的参数。 For example, the duration is never 9000 and the page only shifted vertically. 例如,持续时间从不是9000,页面只是垂直移动。 Can someone help me about this issue? 有人可以帮我解决这个问题吗? Thanks a lot! 非常感谢!
plugin page. 插件页面。 http://jque.re/plugins/image-galleries-decks/ascensor/#/HTML http://jque.re/plugins/image-galleries-decks/ascensor/#/HTML
I think the problem is that you are specifying the Easing
option, but you are not including the jQuery UI library , which is required to support that option. 我认为问题是您正在指定Easing
选项,但您不包括支持该选项所需的jQuery UI库 。 I got this idea from this SO answer . 我从这个答案得到了这个想法。
It seems to work once that library is included: jsfiddle 一旦包含该库,它似乎工作: jsfiddle
Without the jQuery UI library included, the following error is thrown: 如果不包含jQuery UI库,则会引发以下错误:
TypeError: jQuery.easing[this.easing] is not a function
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.