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

Previous Article
Cisco Certified Network Associate Exam,640-802 CCNA, All Answers ccna final ~100/100. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.


Responses
0 Respones to "Lightbox and dynamic links - how and why does this work?"
Your Answer Here
If you have an other answer, please write its here. Thank you so much!