Changes to DOM not visible to jquery plugin after JSON .append()?
I've scanned various DOM and JSON related posts here but nothing really hits on this specific issue yet.
Here's the situation:
- I load a page with an empty div
- I get a JSON call from Flickr with some photos
- I .append() the photos as <image> tags to the page
- I then call the .bookblock() plugin in the JSON success callback
- I can see all the images in the HTML at this point
- ... but the .bookblock() plugin/function only process the first <image> only... it's like it doesn't see the rest of the <image> tags!
I've tried to delay the .bookblock() call with setInterval and setTimeout - but no matter what I do... calling .bookblock() never really works after the dynamic <image> tags are loaded.
See code in action here:
1 - NOT WORKING when adding <images> via JSON
2 - WORKING (only when DOM has <images> before JSON
Any ideas on what I'm doing wrong? Thanks in advance for ANY advice!