我正在尝试用fancybox做一个图像组(我也使用twitter bootstrap等)
但是当出现FancyBox“弹出窗口”时,我收到以下错误:
The requested content cannot be loaded.
Please try again later.
这是一个反映我的问题的测试用例:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Test</title>
<link href="scripts/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet "type="text/css" media="screen"/>
</head>
<body>
<ul>
<li>
<a class="grouped_elements" rel="group1" href="#">
<img class="thumbnail" src="http://placehold.it/90x90" alt>
</a>
</li>
<li>
<a class="grouped_elements" rel="group1" href="#">
<img class="thumbnail" src="http://placehold.it/90x90" alt>
</a>
</li>
<li>
<a class="grouped_elements" rel="group1" href="#">
<img class="thumbnail" src="http://placehold.it/90x90" alt>
</a>
</li>
</ul>
<script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$(".thumbnail").click(function(){
$("a.grouped_elements").fancybox();
});
});
</script>
</body>
</html>
有什么想法吗?
答案 0 :(得分:1)
尝试将HREF设置为如下图片:
<a class="grouped_elements" rel="group1" href="http://placehold.it/90x90_BIG.jpg"">
<img class="thumbnail" src="http://placehold.it/90x90" alt>
</a>