jQuery FancyBox 2.0:助手问题(按钮和拇指)
尽管完全遵循了 fancybox 新版本 2 的指南,但我无法激活助手。我不明白我哪里错了。
有我当前的代码:
HTML:
<div id="disegni" style="display: none">
<div class="title">Disegni</div>
<p> </p>
<a class="fancybox-button" rel="fancybox-button" title="Scultura 1 disegni" href="images/intro/01.jpg"><img src="images/intro/01small.jpg" alt=""/></a>
<a class="fancybox-button" rel="fancybox-button" title="Scultura 2 disegni" href="images/intro/02.jpg"><img src="images/intro/02small.jpg" alt=""/></a>
</div>
Javascript:
$(".fancybox-button").fancybox({
openEffect : 'elastic',
closeEffect : 'fade',
revealEffect: 'none',
hideEffect : 'none',
prevEasing : 'swing',
nextEasing : 'swing',
helpers : {
title : {
type : 'inside' //inside/outside
},
buttons : {}
}
});
Despite having followed exactly the guide of the new version 2 of fancybox, I wasn't able to activate helpers. I don't understand where I went wrong.
There is my current code:
HTML:
<div id="disegni" style="display: none">
<div class="title">Disegni</div>
<p> </p>
<a class="fancybox-button" rel="fancybox-button" title="Scultura 1 disegni" href="images/intro/01.jpg"><img src="images/intro/01small.jpg" alt=""/></a>
<a class="fancybox-button" rel="fancybox-button" title="Scultura 2 disegni" href="images/intro/02.jpg"><img src="images/intro/02small.jpg" alt=""/></a>
</div>
Javascript:
$(".fancybox-button").fancybox({
openEffect : 'elastic',
closeEffect : 'fade',
revealEffect: 'none',
hideEffect : 'none',
prevEasing : 'swing',
nextEasing : 'swing',
helpers : {
title : {
type : 'inside' //inside/outside
},
buttons : {}
}
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你必须包含 js 和 css 文件:
它应该可以工作。不确定为什么您在隐藏元素中添加了链接,但也许您必须这样做。
You have to include js and css files:
And it should work. Not sure why you added links inside hidden element, but maybe you have to.