Async JSON Flickr call + Fancybox reference problem
Hello!
I have a working code example of getting a flickr feed with the help of JSON and present it on my web.
I found the script to do this on several websites but I am not sure who wrote it... anyway:
I modified it to work with fancybox to show the big pictures in the feed instead of jumping to the flickr page.
My problem is (I think) that the JSON call is done after or while I execute the fancybox code. So when I try to build a string with javascript and then update a div called #images with all the picture links and ids, fancybox is not aware of them.
When I hardcode link-tags with ids it works fine. Also I´m not able to get fancybox to work with just the rel-tag like a gallery so I had to hardcode 18 different fancybox-calls.
Check out the code on the link above, it is really ugly, but it works. It would be great to get some help to do this the right way. :-) Maybe someone else is interested in this behaviour as well?
Also to start with an offset in the feed would be nice so it is possible to do some kind of paging.
Best regards
Christian