Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics
0

Lightbox and dynamic links - how and why does this work?





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



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!

 

Tips For All - Cisco Exploration CCNA 4.0

Tips For All  - Cisco Exploration CCNA 4.0 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.

Followers

Share It

Return to top of page Copyright © 2011 | Tips For All Design by: Hainh