Closed kpmanuel closed 8 years ago
Please provide a minimal example on jsfiddle or a similar site.
It looks like on line 70-78 on slick-lightbox.js, this is being added. Is there a way to turn that off without hacking the vendor code?
SlickLightbox.prototype.createModal = function(index) {
/* Creates a `slick`-friendly modal. Rearranges the items so that the `index`-th item is placed first. */
var html, links;
links = this.createModalItems(index);
html = "<div class=\"slick-lightbox slick-hide-init" + (this.isIE ? ' slick-lightbox-ie' : '') + "\" style=\"background: " + this.options.background + ";\">\n <div class=\"slick-lightbox-inner\">\n <div class=\"slick-lightbox-slick slick-caption-" + this.options.captionPosition + "\">" + (links.join('')) + "</div>\n <button type=\"button\" class=\"slick-lightbox-close\"></button>\n <div>\n<div>";
this.modalElement = $(html);
return $('body').append(this.modalElement);
};
Is that a bug or a specific request for your site? In case of the latter, you should be asking on http://stackoverflow.com/, not here. The code is working fine as you can see in the demo.
There's no option for that, as you can see in the docs. You do have to "hack the vendor code" by removing the class in one of the events' callback.
On iOS Chrome, the class "slick-hide-init" is added to the container and prevents the lightbox from displaying.
<div class="slick-lightbox slick-hide-init">
How can I prevent this from happening?