Open omikron opened 4 years ago
Hi
lightcase.close()
can be called from any element or event. However, you have to register it using javascript (not in HTML). The data-rel="lightcase" is just the default (out of the box) identificator for lightcase items. If you want to do advanced stuff, you can also initialize your lightcase links with something else and you will have full control of your HTML elements.
Example:
$( document ).ready(function() {
$('a[data-rel="your-own-value"]').lightcase('init', {
'onFinish': {
// close lightcase automatically
setTimeout(function () {
lightcase.close();
}, 5000);
}
});
});
Hope this helps.
@cbopp-art I have lightcase loading a separate page in an iFrame, is it possible to close the parent lightbox from within the page loaded in the iFrame.
The above example doesn't work for me, nor does running lightcase.close() from an onClick event in the page loaded with lightcase.
Many thanks Jim
Hello,
Is there any way to call lightcase.close() on a lightcase window opened via the inline tag data-rel="lightcase"?
Thank you