首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用fancybox重拾jQuery流沙的问题

用fancybox重拾jQuery流沙的问题
EN

Stack Overflow用户
提问于 2012-03-01 16:05:36
回答 1查看 615关注 0票数 0

我不知道我所做的是否正确,但如果不是,请告诉我。关于上一篇文章,我有一个问题:fancybox在jQuery流沙中使用的问题

fancybox运行得很好,但我有个问题。当我使用脚本时:

代码语言:javascript
复制
$("a.grouped_elements").fancybox({
'titlePosition'     : 'inside',
'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
     return '<span id="fancybox-title-inside">Image ' + (currentIndex + 1) + ' / ' +
              currentArray.length + (title.length ? ' &nbsp; ' + title : '') + 
             '</span>';
}

它的沙箱插件,它是克隆元素,以便于排列,它克隆第一组5次,其余3次,所以我的第一个画廊有7张图像5沙箱克隆= 35张图片在画廊第二画廊有4×3克隆= 12图像在画廊,等等等等。

我怎样才能解决这个问题?

以下是该网站的链接:http://www.lslx-web.com/teste/index.html

再一次,像你这样的人都是很好的人。起作用了。

EN

回答 1

Stack Overflow用户

发布于 2012-03-04 13:57:19

制作一个漂亮的HTML5组合教程网站不允许为您发布解决方案,但我认为这是一个很好的地方,因为其他人有这个问题。

First,您的网页首页应该看起来像,以纠正基本错误。

第二,您的Body部分有很多li标记而没有关闭它们。

Third,这里是让Fancybox和其他不缓存链接的jQuery lightbox脚本在库模式中使用的解决方案:

代码语言:javascript
复制
// This jQuery shown is part of your customized .js file for use with quicksand.js
$('#stage').quicksand(link.data('list').find('li'), function() {

   //
   //  Place your usual jQuery or Javascript GALLERY markup here with CLONING issue (not for cached gallery links).
   //

   // This next jQuery line should be placed prior to the closing of your function.
   // All hidden items Quicksand has set on the webpage will be removed which in turns removes the CLONED jQuery elements.
   // When the Quicksand Menu Filter Button is used again, your filtered items will remain correct in gallery length.
   $('section#container').find('ul.hidden').remove();

});
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9519606

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档