jquery冲突?流沙 vs. Gallerific 互相抵消
我使用 Galleriffic(一个动态画廊 jquery 插件)和 Quicksand(一个 jquery 过滤插件)。
这是我的工作示例: http://www.metropoliscreative.com/jake_test/test1.html
如果单击缩略图,它们将在大窗格中正确加载。如果您选择项目类型或行业,它将根据某些数据类型对这些缩略图进行排序。
然而,问题是一旦你对它们进行排序,Galleriffic 功能就会停止工作。
我的控制台中没有出现任何错误,对缩略图进行排序后代码也没有更改(从我的检查器中可以看到)。我不确定问题是什么。
提前非常感谢您的帮助。
Im using Galleriffic (a dynamic gallery jquery plug) and Quicksand (a jquery filtering plug).
Here is my working example: http://www.metropoliscreative.com/jake_test/test1.html
If you click the thumbnails, they will load properly in the big pane. If you select project type or industry, it will sort those thumbnails based on some data types.
However, the issue is that once you sort them, the Galleriffic functionality stops working.
I'm not getting any errors in my console, nor is the code changing once I sort the thumbnails(from what I can see in my inspector). I'm not sure what the issue could be.
Thank you so much in advance for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,jQuery 事件在页面加载时附加到元素,因此如果动态创建缩略图 - jQuery 尚未将 Galleriffic 功能附加到它们。唯一的解决方法是在 Quicksand 完成新缩略图的调用后,在回调中重新附加 Gallerific 功能。
希望有帮助
As far as I am aware, jQuery events are attached to the elements upon page load, so if the thumbnails are being created dynamically - jQuery hasn't attached the Galleriffic functionality to them. Only way round it, would be to re-attach the Gallerific functionality on a callback after Quicksand has finished calling in the new thumbnails.
Hope that helps
当您使用流沙时,它不会放回gallerific使用的
ul.thumbs
类。一定要用流沙吗?你不能只使用隐藏和显示来过滤图像吗?
或者,作为回调的一部分,您可以将所有
li
包装在ul.thumbs
中,然后再将它们发送到 galleryerific。When you use quicksand, it does not put back the
ul.thumbs
class that gallerific uses.Do you have to use quicksand? can't you just use hide and show for filtering images?
Or maybe, as part of the callback, you can wrap all the
li
in aul.thumbs
before sending them to gallerific.