biati-digital / glightbox

Pure Javascript lightbox with mobile support. It can handle images, videos with autoplay, inline content and iframes
MIT License
2.03k stars 228 forks source link

Disable modal loading icon? #421

Closed ipkpjersi closed 1 year ago

ipkpjersi commented 1 year ago

Important. I would like to be able to disable the loading icon when clicking on an image. This is by far the best lightbox plugin I have ever seen, but I can't seem to figure out how to disable the loading icon when clicking on the image to open up the modal.

Please describe the feature you want to be implemented. I would like an option to not display any loading icon when opening up the modal.

Explain why the feature is useful The feature is useful because it allows this plugin to be truly "lightweight" by making loading the modal truly seamless.

Additional context If the ability to disable the loading icon already exists, please let me know.

Here is an example of the loading icon, you can see it when you click the images (save the page as index.html and you should be able to test it): https://gist.github.com/ipkpjersi/0a79ecbc15d83eb7e89a77646ae46b26

gingerchew commented 1 year ago

Hey there @ipkpjersi,

You can just use display: none in your CSS.

ipkpjersi commented 1 year ago

Hi, sorry @gingerchew which selector would I use to display:none it? I can't seem to find the selector for the loading icon.

gingerchew commented 1 year ago

https://github.com/biati-digital/glightbox/blob/master/src/js/glightbox.js you can find the default html here

ipkpjersi commented 1 year ago

It seems like .gloader with a display: none did not work until I added an !important and then it worked. Everything is now working exactly the way I want it to with this amazing lightbox plugin.

Thanks!