我正在使用Fancybox顯示內聯內容(與圖像鏈接到一個新頁面的分區)。模式中的div和圖片顯示效果很好,但點擊圖片進入新頁面時,我會收到「請求的內容無法加載,請稍後再試。」錯誤。FancyBox returns「請求的內容無法加載,請稍後再試。」與鏈接
的的fancybox的javascript如下:
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox().hover(function() {
$(this).click();
});
$("#fancybox-outer").fancybox().mouseleave(function() {
$("#fancybox-overlay").click();
});
});
</script>
並適用於HTML的下列片段:
<li class="fancybox-outer">
<a id="inline" href="#hover-image_0" class="fancybox">
<img src="http://website.com/file/id:63" style="margin-top: 32px" />
</a>
<p><a href="http://website.com/template/view/18">1G2A</a></p>
<div style="display: none;"><div id="hover-image_0"><a href="http://website.com/template/view/18"><img src="http://website.com/file/id:64/ext:.png" class="img" /></a></div></div>
</li>
<li class="fancybox-outer">
<a id="inline" href="#hover-image_1" class="fancybox">
<img src="http://website.com/file/id:60" style="margin-top: 32px" />
</a>
<p><a href="http://website.com/template/view/17">17</a></p>
<div style="display: none;"><div id="hover-image_1"><a href="http://website.com/template/view/17"><img src="http://website.com/file/id:61/ext:.png" class="img" /></a></div></div>
</li>
有誰看到什麼可能導致的問題,或者我需要糾正呢?
謝謝!
更新:2012年1月19日 - 我執行我的服務器作爲第一個答案(http://estorkdelivery.com/example/example.html)在相同的測試,發現我得到了相同的響應返回。所以它似乎與我的服務器有關。
我仍然需要這個問題的幫助。有人有主意嗎?
謝謝!
更新:2012年1月28日 - 我一直在努力找到一個解決這個問題,但我已經用完了時間,去了一個完全不同的解決方案。我保持這個問題是開放的,以防其他人在相同的錯誤中運行或最終找到解決方案。謝謝!
哇! ''同時確保你有適當的DOCTYPE for fancybox正常工作' – 2014-09-19 08:49:15