FancyBox鏈接沒有顯示在燈光盒中-我遺漏了什么?好吧,我以為我正確地實現了這一點,但我想我一定是在某個地方搞錯了。這是我的密碼:jQuery在這里:jQuery(document).ready(function( $ ){$(function() {
$( ".cta-nav-hover" ).tooltip({
show: null,
position: {
my: "right+40 bottom",
at: "left bottom"
},
open: function( event, ui ) {
ui.tooltip.animate({ top: ui.tooltip.position().top - 10 }, 75 );
}
});});$(function() {
$(".fancybox").fancybox();});});然后是HTML:<div id="cta-nav-wrapper">
<ul id="cta-nav">
<li class="bio">
<a href="http://placehold.it/350x125" title="Bio" class="cta-nav-hover fancybox"><span></span></a>
</li>
</ul></div>我認為這是可行的,但當我單擊該鏈接時,它只會讓我看到占位符圖像,而不是彈出。我做錯什么了?看起來我的文件排列得很好,或者至少當我通過Firebug檢查它們時,就會找到正確的js。我也嘗試過另一個叫做MagniicPopup的插件,但是它也沒有響應。我想這和我的WordPress主題的設置有關。
2 回答
慕少森
TA貢獻2019條經驗 獲得超9個贊
href="http://placehold.it/350x125"image
fancybox.image
<a class="cta-nav-hover fancybox fancybox.image" href="http://placehold.it/350x125" title="Bio"><span></span></a>
data-fancybox-type
<a data-fancybox-type="image" href="http://placehold.it/350x125" title="Bio" class="cta-nav-hover fancybox"><span></span></a>
type
$(".fancybox").fancybox({
type: "image"});注
編輯
一個使用“fancybox.Image”類: 工作
其他沒有: 不工作
- 2 回答
- 0 關注
- 498 瀏覽
添加回答
舉報
0/150
提交
取消
