I need to group all the
.lightbox elements in a discussion.
Does someone has any idea where i should call lightbox.js in order to get fired when all the discussion is ready, not each individual post?
So far i figured out that:
Lightbox is set up in
lib/lightbox.js and is called after DOM is rendered by
api.decorateCooked() which just pass a callback function to
addDecorator has as argument, a DOM element
Lightbox.js is actually called in the context of each post replay.
Basically if in
lightbox.js i do:
console.log(’.lighbox’) i get always one or as many picture EACH SINGLE USER added to each replay.
I need instead to get ALL the image that are in the whole discussion.
So far the only place where i found
lightbox.js called is in
post-decoration.js, which it confuse me a little…