


Set to true if the selector in "data-sub-html" should use the current item as its origin.Ĭurrently this is used only for adding support to srcset attribute via picturefill library
#Lightgallery for ionic2 code#
In the code this become selector = document.querySelector(this.s.selectWithin ).querySelectorAll(this.s.selector) Ĭustom selector property instead of direct children.īased on your markup structure, you can specify custom selectors to fetch media data for the galleryĮxample - '.my-selector' | '#my-selector' | thisĭelay in hiding controls for the first time when gallery is opened Instead of that you can tell lightGallery to select element relative to another element.Įxample - '.my-selector-container' | '#my-selector-container' If preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.īy default selector element relative to the current gallery. Slide will be loaded in the background after the 4th slide is fully loaded. Will exicute only after the current slide is fully loaded.įor example, if you click on 4th image and if preload = 1 then 3rd slide and 5th 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,

Use this options if you want to enable them or change any other settings for mobile devicesĪbility to navigate to next/prev slides on mousewheelĬontrol how many slide items should be kept in dom at a time 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. Specify which slide should load initially 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. It is mandatory when you use hash plugin for multiple galleries on the same page.
/ionic-bond-58fd4ea73df78ca1590682ad.jpg)
getElementById ( 'gallery-container' ), )
#Lightgallery for ionic2 install#
You can install lightgallery using the following NPM - NPM is a package manager for the JavaScript
#Lightgallery for ionic2 download#
Of the following method to download lightGallery LightGallery is available on NPM, Yarn, Bower, CDNs, and GitHub. Smart image preloading and code optimization.Easily customizable via CSS (SCSS) and Settings.Swipe/Drag up/down support to close gallery.20+ Hardware-Accelerated CSS3 transitions.YouTube Vimeo Wistia and html5 videos Support.Double-click/Double-tap to see actual size of the image.Modular architecture with built in plugins.LightGallery is a lightweight, modular, JavaScript library for creating beautiful image & video galleries for the web and the mobile.
