LightGallery keeps only the lowest possible number of slides in the dom at a time. To improve performance by reducing number of gallery items in the dom, Lg-slide lg-fade lg-zoom-in lg-zoom-in-big lg-zoom-out lg-zoom-out-big lg-zoom-out-in lg-zoom-in-out lg-soft-zoom lg-scale-up lg-slide-circular lg-slide-circular-vertical lg-slide-vertical lg-slide-vertical-growth lg-slide-skew-only lg-slide-skew-only-rev lg-slide-skew-only-y lg-slide-skew-only-y-rev lg-slide-skew lg-slide-skew-rev lg-slide-skew-cross lg-slide-skew-cross-rev lg-slide-skew-ver lg-slide-skew-ver-rev lg-slide-skew-ver-cross lg-slide-skew-ver-cross-rev lg-lollipop lg-lollipop-rev lg-rotate lg-rotate-rev lg-tubeĪbility to navigate to next/prev slides on mousewheelĬontrol how many slide items should be kept in dom at a time Note - mobileSettings does not merge default values, You need to provide all mobileSettings including default values Use this options if you want to enable them or change any other settings for mobile devices Note - this is applied only at the time of loadingīy default controls and close buttons are disabled on mobile devices. If false, will disable the ability to loop back to the beginning of the gallery from the last slide. Use `0000-000` as a temporary license keyĪutomatically load poster image for YouTube videos Please contact us for getting a license key at you want to test lightGallery before purchasing a commercial license, you can For projects that are compatible with GPLv3 license, If you are using lightGallery for commercial projects, you need to purchase a commercial license Specify which slide should load initially Minimum lightGallery version required: V2.5.0 Note - this option will be ignored if loop or slideEndAnimation is set to true If true, prev/next button will be hidden on first/last image. Pass 0 if you don't want to hide the controls Option to get captions from alt or title tags. getElementById ( 'gallery-container' ), ) But its not the most clever way because i dont know what lightGallery does beside listening to click and touch events to the childs of its container.Ĭonclusion: i think it would be an improvement to add a public function to destroy/remove the full functionality of lightGallery.LightGallery ( document. Workaround: before my filter does anything i remove all click and touch eventlistener from every image in the lightGallery container, i do my filtering and initialize lightGallery again. Try#2: When i initialize lightGallery after my content has changed, it opens on click at images which are "new" and turns black when i click at images which already were there at the first initialisation. ![]() Try#1: $("#container").lightGallery("destroy") do my filterings and $("#container").lightGallery() again. But image2 does nothing because of the missing eventListener (it was not in the lightGallery container when it gets initialized). When i change the filter to filtertype2 you can see that the first image still opens lightGallery because it is attatched to filtertype1 aswell. The scenario: We start at a page where filtertype1 is active. in this case called "filtertype1", "filtertype2", "filtertype3". To explain: every image can be in multiple categories. I use this filter method to prevent loading images again and to be able to add some animations. My page is not public yet, so i provide a jsfiddle for you:
0 Comments
Leave a Reply. |