Lightgallery: Launching the gallery from an external button

Created on 24 Mar 2014  ·  3Comments  ·  Source: sachinchoolur/lightGallery

I absolutely love this plugin, its simple to use and looks gorgeous!
Can I launch the gallery by clicking a button which is outside the div containing the images on the same page?

  • img
  • img

thanks

Most helpful comment

Hi

method 1 (trigger click).
while clicking on the launch button you can trigger click for the first li.
example http://jsfiddle.net/sachin377/QQpdL/4/

method 2 (Load Dynamically).
please go threw the example http://sachinchoolur.github.io/lightGallery/examples.html#dynamicBlock
jsfiddle > http://jsfiddle.net/sachin377/Zf4UQ/3/

you can use any of these methods for solving your issue.

Regards,
Sachin

All 3 comments

Hi

method 1 (trigger click).
while clicking on the launch button you can trigger click for the first li.
example http://jsfiddle.net/sachin377/QQpdL/4/

method 2 (Load Dynamically).
please go threw the example http://sachinchoolur.github.io/lightGallery/examples.html#dynamicBlock
jsfiddle > http://jsfiddle.net/sachin377/Zf4UQ/3/

you can use any of these methods for solving your issue.

Regards,
Sachin

Thanks Sachin! That worked.

Thank you so much Sachin! That worked and save me

Was this page helpful?
0 / 5 - 0 ratings