I had a problem, was going to ask how to fix it, but then the answer popped up in a related question. Seeing I have little experience with jQuery, I would like to understand exactly "what" happens with what I'm doing.
FYI: jQuery (latest) + jCarousel + Lightbox.
jCarousel creates a few links for me, and Lightbox captures these links and shows a nice frame around the picture I linked.
The code that did the trick was
$('a.gallery').live("click", function(e) {
$(this).lightBox({
imageLoading : 'img/lightbox-ico-loading.gif',
imageBtnClose : 'img/lightbox-btn-close.gif',
imageBtnPrev : 'img/lightbox-btn-prev.gif',
imageBtnNext : 'img/lightbox-btn-next.gif'
});
$(this).triggerHandler('click');
e.preventDefault();
});
..instead of
$('a.gallery').lightBox({
imageLoading : 'img/lightbox-ico-loading.gif',
imageBtnClose : 'img/lightbox-btn-close.gif',
imageBtnPrev : 'img/lightbox-btn-prev.gif',
imageBtnNext : 'img/lightbox-btn-next.gif'
});
My question is; what is the exact difference between these?
Thanks alot
Comments
Post a Comment