Anyone have any experience using LightGallery?
Hi,
Designer posing as a coder here. A few months back, I was looking for a bare-bones lightbox script to zoom into various items in a gallery. Nancy OShea recommended a list of mobile-responsive solutions, and I'm finally getting around to installing one of them, which I'd bookmarked as my favorite; LightGallery.
It's available in .js or jQuery flavors (as redundant as that sounds to my inexperienced ears) so I went with the latter, assuming jQuery adds enhancements of some sort. On the surface, this thing looks like it can do anything. Very modular, more than I need. So for a first run, I kept it simple by linking to lightgallery.css and lightgallery-all.js (rather than individual .js modules, also offered).
And it appears to work as advertised right out of the box : swipes, animations, all there.
The hard part (for me, as a designer) will be the customizing, as I feel the documentation was written for regular Github-level coders who can fill in most blanks. (Or maybe that's just what I tell myself to avoid facing how dumb I actually feel when I try customizing this thing.)
Let's say I want to :
- Streamline the options in the lightbox down to only 3 or 4, by eliminating social media sharing, or a couple of those zoom icons.
- Make that lightbox background layer less opaque (it appears to be 100% black on my screen).
What would be the syntax for that?
I figure those are basic enough that there would be existing toggles for them.
And I believe they're all located HERE, right? (Or do I even have that wrong?)
Here's how I'm calling the code :
<script type="text/javascript">
$(document).ready(function() {
$('#lg').lightGallery();
selector: '.item'
});
</script>
I believe the customizing happens there, but I might need some help with the first two.
(I'm fairly confident I can take it from there, once I see this specific syntax.)
Thanks!
PS: While I'm here, is it better (in 2019) to use single or double quotes for things like class or ID names in .js? I'm using single in my example, and not even sure why.
