我试图用Fancybox 2创建一个内联内容库,并且我失败了。Fancybox2内联内容库
我在网上查了一些其他的资源,他们似乎表明这样做比较容易,但是,我似乎无法得到它的工作。
这里是我的小提琴:
http://jsfiddle.net/beefchimi/jtxHd/2/
现在,我觉得捣鼓没有加载的资源,所以这就是一个问题。但即使资源不起作用,我也会遇到fancybox错误。
资源:
http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js?v=2.1.3 http://fancyapps.com/fancybox/source/jquery.fancybox.css?v=2.1.3
任何帮助将不胜感激。
编辑:因此,我无法提交我的问题,而不包括一些代码,因为链接到的jsfiddle是不行的,所以,这里是我的标记和的fancybox初始化,这你还会发现在的jsfiddle:
HTML:
<section><!-- Gallery 1 |begin| -->
<!-- Inline post-1 -->
<article>
<a href="post-1" class="inlinepopup" rel="gallery1">Gallery 1: post-1 > post-2 > post-3</a>
<div id="post-1">Inline content for #post-1. Group is Gallery 1.</div>
</article>
<!-- Inline post-2 -->
<article>
<a href="post-2" class="inlinepopup" rel="gallery1">Gallery 1: post-1 < post-2 > post-3</a>
<div id="post-2">Inline content for #post-2. Group is Gallery 1.</div>
</article>
<!-- Inline post-3 -->
<article>
<a href="post-3" class="inlinepopup" rel="gallery1">Gallery 1: post-1 < post-2 < post-3</a>
<div id="post-3">Inline content for #post-3. Group is Gallery 1.</div>
</article>
</section><!-- Gallery 1 |end| -->
<section><!-- Gallery 2 |begin| -->
<!-- Inline post-4 -->
<article>
<a href="post-4" class="inlinepopup" rel="gallery2">Gallery 2: post-4 > post-5</a>
<div id="post-4">Inline content for #post-4. Group is Gallery 2.</div>
</article>
<!-- Inline post-5 -->
<article>
<a href="post-5" class="inlinepopup" rel="gallery2">Gallery 2: post-4 < post-5</a>
<div id="post-2">Inline content for #post-5. Group is Gallery 2.</div>
</article>
</section><!-- Gallery 2 |end| -->
的jQuery:
$(document).ready(function() {
$('a.inlinepopup').fancybox({
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'type' : 'inline'
});
});
omg对我来说这是一个愚蠢的疏忽。我是怎么想到的......好吧,非常感谢Alex,你已经解决了我的问题:)我还有其他几个烦恼正在发生,但这些都是我想要的新问题。再次感谢! – beefchimi