Closed Toccamonium closed 8 years ago
Look at using onContentLoaded
instead
Thanks for answering my question so quickly. Unfortunately onContentLoaded
nothing happend at all. I was testing this with a simple alert("")...
I tried this but it isn't working as well:
...
$(this).ekkoLightbox({
onContentLoaded: function() {
var lb = this;
$(lb.modal_content).css("background","red")
}
});
...
Do you have an simple working example :)
All the docs (http://ashleydw.github.io/lightbox/) have events for onShown
and onContentLoaded
. Open the console for the output, the source will show you how it is done
Hi, I want to access content within the modal box like this, but it's not working, any idea?
$(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) { event.preventDefault(); var name = $(".vp-name").text(); $(this).ekkoLightbox({ onShown: function() { var lb = $(".modal-body").find("span"); $(lb).text(name); } }); });
best regards