This event fires before next image arrives This event fires after the lightbox was closed This event fires before the lightbox closes This event fires after the lightbox was opened This event fires before the lightbox opens How much zoom when scrolling via mousewheel If smaller than 100 it should be used with animationSlide:falseįocus the lightbox on open to enable tab control The duration for fading in and out in milliseconds. If empty or false no class is setĮlements with this class are fixed and get the right padding when lightbox opens If false nothing is addedĮnable history back closes lightbox instead of reloading the pageĪdds class to html element if lightbox is open. Text for a download link below the image. The message displayed if image was not foundĪdditional HTML showing inside every image. 'Image not found, next image will be loaded' Stop scrolling page if lightbox is opened Scales the image up to the defined ratio size How much pixel you have to swipe, until next or previous imageĪdds a class to the wrapper of the lightbox Group images by rel attribute of link with same selector.Ĭloses the lightbox when clicking outside Weather to slide in new photos or not, disable to fadeĪllows preloading next und previous imagesĪllow keyboard arrow navigation and close with ESC key List of fileextensions the plugin works with or false for disable the check Options are top, bottom or outside (note that outside can be outside the visible viewport!)Īdds a delay before the caption shows (in ms)Īdds an additional class(es) to the sl-caption use space or comma to add multiple classes. You can choose between attr, data or text Set it to "self" for the A-Tag itself or use a callback which returns the element For the trigger, you don’t need to include img – LightGallery is bound to the a, so if you trigger the click on the a that should be good enough.Įven after you do all of this, I am not sure if it will work – I have never had to make it work this way, and there might be all types of issues such as double initiation of the gallery if someone clicks on a thumbnail, or issues with deeplinking, or an inability to close the lightbox etc.Set the element where the caption is.You are using ES6 syntax, which is not going to work for IE 11, but that is a fairly small percentage of users.But as such you might not even need that line. I may be wrong, but once you have fixed the above two problems you will find out. I don’t believe lightGallery is available as a function directly, as you have called in your code.Your syntax is using $, presumably for jQuery, but you haven’t specified anywhere that $ is refering to jQuery.While this will load Photonic in the header, there is no guarantee that your theme’s script will be called after Photonic’s, which is why you will need to work with your theme’s support. Photonic’s script loads in the footer by default – you can change this to load in the header instead (via Photonic → Settings → Generic Options → Generic Settings → Include Photonic JS for non-Photonic Images / Videos and Photonic → Settings → Generic Options → Generic Settings → Force JS in header when possible). You will have to work with your theme’s support to figure out how to load the script after Photonic. You are calling the JavaScript at an arbitrary place, before Photonic’s scripts have been loaded.There are many problems with your JavaScript (you can see an error on your JavaScript console).
0 Comments
Leave a Reply. |