Which appears to be caused by () returning null. The console logs the error: TypeError: Cannot read properties of null (reading 'focus') The gallery should just open - either when triggered by clicking an image, or calling openGallery(). Import lightGallery from "lightgallery" import lgVideo from "lightgallery/plugins/video" import "lightgallery/css/lightgallery-bundle.css" import Expected result More features: 20+ transition animations. The Vanilla JavaScript Version is available here. A lightweight, customizable, modular, responsive, lightbox gallery plugin for jQuery. Here is the Stimulus controller (if helpful): lightGallery is a lightweight, elegant, responsive, mobile-friendly jQuery JavaScript plugin for displaying an image/video gallery in a fullscreen lightbox with CSS3 transition effects. cdnjs is a free and open-source CDN service trusted by over 12.5 of all websites, serving over 200 billion requests each month, powered by Cloudflare. We have a license key and also use the video plugin. Steps to reproduceįor context, this is a Rails app using Stimulus. ![]() Edit: this error is present in at least 2.2.0 and 2.2.1. This error appeared in 2.2.1 and is resolved by downgrading back to 2.2.0. However, the issue re-appears for each new page. Oddly, refreshing the page then fixes the issue. TypeError: Cannot read properties of null (reading 'focus')Īt LightGallery.push./node_modules/lightgallery/.LightGallery.openGallery (vendors-node_modules_algolia_autocomplete-js_dist_esm_autocomplete_js-node_modules_algolia_au-7a256d.js:27553)Īt extended.openImages (application.js:2556)Īt (vendors-node_modules_algolia_autocomplete-js_dist_esm_autocomplete_js-node_modules_algolia_au-7a256d.js:12888)Īt (vendors-node_modules_algolia_autocomplete-js_dist_esm_autocomplete_js-node_modules_algolia_au-7a256d.js:12865)Īt (vendors-node_modules_algolia_autocomplete-js_dist_esm_autocomplete_js-node_modules_algolia_au-7a256d.js:13680) See the Pen lightgallery.js by Sachin choolur on CodePen.Error invoking action "click->image-gallery#openImages" And if you need the source code head over to the GitHub repo and grab a copy for yourself. You can see a full demo on the demos page or check out the pen below. If you’d prefer this as a jQuery plugin there is a lightgallery.js plugin ported for jQuery users. But it plays nice with big libraries such as jQuery or Bootstrap as well. This library is free of all dependencies and it runs on pure JavaScript. This truly is the best lightbox gallery plugin offering the best possible user experience. You can even embed iframes or videos from sites such as YouTube or Vimeo. It’s the perfect choice for a designer or photographer who wants a brilliant method to display their portfolio on their site. Oh, and did I mention it’s completely mobile-friendly? You can swipe photos through the gallery with your finger or even with a mouse. ![]() But you’ll also find info for custom data attributes, Sass variables, and even a plugin API to build modules onto lightgallery. A customizable, modular, responsive, lightbox gallery plugin for jQuery. It has details for options and callback methods. jQuery LightGallery LightGallery is a jQuery Dialogs / Lightboxes plugin. In fact, I’m blown away by how much detail went into the documentation. You can pick and choose which of these buttons you want to display by editing the options when you call the plugin. In the upper-right corner, you’ll see a series of buttons for extended features. With lightgallery.js, all focus goes onto the slideshow and the first visible image.Īt the bottom of each slide, you can find a small description with links or whatever text you want. I vastly prefer this plugin over other slideshows that only take up a portion of the screen. 10 Best Photo Gallery & Slideshow WordPress Pluginsįor any portfolio or image-oriented website running on WordPress, it is imperative to have a photo gallery and.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |