Open KingSora opened 5 years ago
Thank you very much for this
Hi @KingSora, I wanted to thank you again for your work on this. I've implemented on a number of sites and I have to say it is a huge advantage to be able to define the image dimensions dynamically this way.
One thing I've noticed though is that there seems to be some flickering issues when switching between slides. The image will flash blank and then load. This doesn't seem to happen when I supply all the dimensions the old way. Any ideas what might be causing this?
@cylott good question... since I wrote this quite some time ago I don't remember the exact details and whether there is a issue with the code from me. I'm sorry I can't help.
Could this script be modified to read captions from an img "data-caption" tag?
Good day!
Today I came across this library, and the initialization process is very different from all the other
lightbox
plugins I've tested out. It was also kinda deterrent for me that I have to provide the image dimensions by myself (as mentioned here).After testing I've to admit: this library is very very good. So I've worked out a example which could help potential new users to overcome the troubles of the initialization process.
In my application I'm working with
jQuery
, so I've implemented this whole example as ajQuery extension
.With this snipped the initialization process is as easy as:
A example fiddle can be found here.
I've also implemented a option to define the
gallery element
, per default its theparent
element of the clicked element:A example fiddle can be found here, the difference from the above example is, you don't really have really 2 galleries, but one big with 7 items, because the gallery element is the body.
I've also managed to implement a automated image size detection (with cache) which does a pretty okay job and isn't as ressource hungry as in #741 or #796 because of the mentioned cache system.
You could also implement something like this (maybe even without jQuery as it is only a tool and dont really required here) on the
getting started page
for people which aren't as experienced in javascript or just want a "quick and dirty" initialization.