问题
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