Fancybox不使用jQuery选项卡
我的网站上有Fancybox,例如,向下滚动到海洋探索照片库: 我已经在页面的测试版本中添加了jQuery选项卡,已经可以工作了,但是现在其中一个选项卡中的FancyBox无法工作。单击的图像将在新窗口中打开。我猜FancyBox函数在选项卡中没有被激活,但不知道如何修复它。请参见“照片库”选项卡中的“非工作”页面示例: 以下是适用于其他页面的功能:Fancybox不使用jQuery选项卡,jquery,fancybox,Jquery,Fancybox,我的网站上有Fancybox,例如,向下滚动到海洋探索照片库: 我已经在页面的测试版本中添加了jQuery选项卡,已经可以工作了,但是现在其中一个选项卡中的FancyBox无法工作。单击的图像将在新窗口中打开。我猜FancyBox函数在选项卡中没有被激活,但不知道如何修复它。请参见“照片库”选项卡中的“非工作”页面示例: 以下是适用于其他页面的功能: <script type="text/javascript"> $(document).ready(function()
<script type="text/javascript">
$(document).ready(function() {
$("a[rel=fancygallery]").fancybox({
'transitionIn' : 'none',
'transitionOut' : 'none',
'titlePosition' : 'over',
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>';
}
});
});
</script>
$(文档).ready(函数(){
$(“a[rel=fancygallery]”)。fancybox({
“transitionIn”:“无”,
“transitionOut”:“无”,
“标题位置”:“结束”,
“标题格式”:函数(标题、currentArray、currentIndex、currentOpts){
返回'Image'+(currentIndex+1)+'/'+currentArray.length+(title.length?''+title:'')+'';
}
});
});
我已经更改了“_testing”页面,以删除对jQuery库不同版本的引用,但这并没有解决问题。在四处搜索之后,我试着换成这样,但还是没有运气:
<script type="text/javascript">
$("#OEtabs-3").each(function() {
$("a[rel=fancygallery]").fancybox({
'transitionIn' : 'none',
'transitionOut' : 'none',
'titlePosition' : 'over',
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>';
}
});
});
</script>
$(“#oetab-3”)。每个(函数(){
$(“a[rel=fancygallery]”)。fancybox({
“transitionIn”:“无”,
“transitionOut”:“无”,
“标题位置”:“结束”,
“标题格式”:函数(标题、currentArray、currentIndex、currentOpts){
返回'Image'+(currentIndex+1)+'/'+currentArray.length+(title.length?''+title:'')+'';
}
});
});
非常感谢您的建议 fancybox 1.3.4使用的不推荐使用的jQuery.browser msie属性有问题(另请参见) 因此,您必须降级到
jQuery 1.8.3
,或者更好地使用新的fancybox 2
(但请注意此处的非商业许可证)
请参见带有jQuery 1.8.3
和fancybox 1.3.4
的小演示:
以及
jQuery 1.9.1
和fancybox 2.1.4
的版本,此处:您对fancybox 1.3.4
使用的不推荐使用的jQuery.browser msie属性有问题(另请参阅)
因此,您必须降级到jQuery 1.8.3
,或者更好地使用新的fancybox 2
(但请注意此处的非商业许可证)
请参见带有jQuery 1.8.3
和fancybox 1.3.4
的小演示:
以及
jQuery 1.9.1
和fancybox 2.1.4
的版本,这里:你能提供一个吗?你能提供一个吗?@Lauren:关于这个问题的更多信息这里的帖子包括可能的解决方法和/或与jQuery v1.9+一起工作的fancybox v1.3.4补丁文件劳伦:关于这个问题的更多信息这里的帖子包括可能的解决方法和/或与jQuery v1.9一起使用的fancybox v1.3.4修补文件+