Add to ajax loaded image link
-
Hello. Love your plugin. Its been great.
I have a text list of images that are added via an ajax request. I want them to load the image via your lightbox.
If I add the ‘<a href=”myimage.jpg”>View image</a>’ code direct into the template it works as I’d expect. So lightbox exists and the method I linked to the image is valid. However I need to pull this image list form another service so its added via ajax.
I saw on this post here https://github.com/arnowelzel/lightbox-photoswipe/issues/26 that you could do that by calling “lbwpsInit();” after I have loaded my ajax. But that doesnt work. JS console tells me that “ReferenceError: lbwpsInit is not defined”.
Can you please tell me what function I can call to get it to attached the lightbox listener to my image links? It get it to re-check the page for links?
Thank you!
- The topic ‘Add to ajax loaded image link’ is closed to new replies.