PDA

View Full Version : Lightbox 2 and Featured Content Slider issues



A2597
04-06-2009, 03:18 AM
1) Script Title:
Featured Content Slider
Lightbox 2.03

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm

3) Describe problem:
I can't seem to get these scripts to work together. The featured content slider works properly, but when I click on the thumbnail it doesn't bother using the lightbox, and just redirects to the image.

The way I want this to work is when you mouseover the thumbnails it displays in the larger image viewer, and then the user can click on the thumbnail or the larger image to load the lightbox. Currently, it works fine for the larger image, but the thumbnail won't work.

Any thoughts on how I can combine these scripts?

Link:
http://www.geeks2go.biz/wip/quiteeventful/portfolio.php

And the code snippet I think is the culpret:



<div id="paginate-slider2" class="pagination">
<a href="images/portfolio/aga/1_lg.jpg" class="toc" rel="lightbox"><img src="images/portfolio/aga/1_sm.jpg"></a>
<a href="#" class="toc"><img src="images/portfolio_thumb_bgr.jpg"></a>
<a href="#" class="toc"><img src="images/portfolio_thumb_bgr.jpg"></a>

</div>

jscheuer1
04-06-2009, 03:58 AM
Try upgrading to Lightbox 2.04:

http://www.lokeshdhakar.com/projects/lightbox2/#download

Since it doesn't require onload initialization of links, it plays better with a wide variety of other scripts than does Lightbox 2.03 and previous versions of Lightbox.

A2597
04-06-2009, 01:04 PM
Thank you for the quick reply! I didn't even know 2.04 was out.

Unfortunately, the problem persist, the thumbnail just redirects to the image, rather than opening in the lightbox.

Any other ideas?

Thanks again!

A2597
04-07-2009, 02:45 PM
I am loath to bump my own thread, but as of yet I still haven't figured out what is preventing this from working, and would truly appreciate any assistance you can offer. :)

:EDIT: (Soas not to bump it again)
I found a solution, for anyone that might be running a search in the future.

I resolved this by using:
http://www.dynamicdrive.com/dynamicindex17/featuredcontentglider.htm

Then using this modified .js file here for on mouseover:
http://www.dynamicdrive.com/forums/showthread.php?t=37460

From this JS file I learned how to replace teh glide and turn it into a fade:
http://www.dynamicdrive.com/forums/blog.php?b=11&goto=prev

line 26, comment out the animate, and replace it with opacity:


//$jtarget.animate(endpoint, config.speed)
$jtarget.css(endpoint).css({opacity:0}).animate({opacity:1}, config.speed) //custom code

Then using the jquery fix posted here:
http://www.dynamicdrive.com/forums/showthread.php?t=37797

And voila, the scripts work!