Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run lightbox in jQuery by click on a button

for running the lightbox in jquery you must click on one image('a' link) of the gallery then immediately lightbox runs....

$('#gallery a').lightBox();

but i am going to use the lightbox as a zoom, that means i have a button 'ZOOM', by clicking this buttom i am going to open my gallery...

i don't know how i can do this...

like image 509
saeed Avatar asked Aug 22 '10 09:08

saeed


1 Answers

you could use:

     $('#gallery a').lightBox();
     $('#zoomButton').click(function(){
         $('#gallery a:first').click();
    })

Or possibly

$('#gallery a:first').trigger();

Untested but should work

like image 112
Stuart Burrows Avatar answered Sep 28 '22 18:09

Stuart Burrows