views:

75

answers:

2

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

A: 

I guess it's not supported in that Lightbox plugin. Try out ColorBox or Fancybox plugins, they are much more customizable.

Otar
A: 

you could use:

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

Or possibly

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

Untested but should work

lnrbob
thanks this work .... but it has a crazy trick.... i have to have 2 gallery with the same images.... one for zoom... another for rollover.... $('#gallery a').lightBox(); $('#zoomButton').click(function(){ $('#gallery a:first').click(); })
saeed