jQuery - Flickr plugin with colorbox - gallery displays previous photos

元气小坏坏 提交于 2019-12-11 19:01:28

问题


I'm working on a plugin to display multiple flickr photo set photos retrieved from the api in a colorbox gallery. I've gotten really close (with the help of some nice SO users!)

The idea is that the user can enter html like:

    <div id="72157634235266773" class="thumbs"></div>   

    <div id="72157633471728555" class="thumbs"></div>

and the plugin handles the rest.

Check out this fiddle: http://jsfiddle.net/eBGVV/5/

My issue is that Photo Set 2 here starts at image 64 and you can use the the left arrow to see the images in Photo Set 1. Ideally, each thumbnail image would launch a colorbox gallery of just the photos that match its photoset id.

Any ideas how to pull this off?

Thanks.


回答1:


I figured it out. I was using the rel property incorrectly to group the photos together. This is what worked:

$("a.gallery[rel=" + PhotoSetID +"]").colorbox();

here is a working fiddle:

http://jsfiddle.net/eBGVV/6/



来源:https://stackoverflow.com/questions/17262435/jquery-flickr-plugin-with-colorbox-gallery-displays-previous-photos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!