开发者

run lightbox in jQuery by click on a button

开发者 https://www.devze.com 2023-01-12 09:04 出处:网络
for running the lightbox in jquery you must click on one image(\'a\' link) of the gallery then immediately lightbox runs....

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

$('#gallery a').lightBox();开发者_StackOverflow中文版

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...


you could use:

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

Or possibly

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

Untested but should work

0

精彩评论

暂无评论...
验证码 换一张
取 消