PDA

View Full Version : Lightbox V2



dipper85
05-11-2010, 04:46 AM
1) Script Title: Lightbox image viewer 2.03a

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

3) Describe problem: I can't get this script working. I have copied and pasted all the code and links and can't figure out what is wrong. It just opens a new window with the image and doesn't run the script.

http://www.hamlinfistula.org.au/news/pastevents.html

It is being used on this page under the Lighting a Candle story. You will see the thumbnails.

Any help will be greatly appreciated. Pulling out my hair on this one.

jscheuer1
05-11-2010, 05:45 AM
Version 2.03a will not work with jQuery. In addition, you haven't uploaded one of the required files, effects.js.

You have choices. You could use a jQuery based lightbox type script. Or you could use version 2.04a* of lightbox and put jQuery into noConflict mode.

Using a jQuery based lightbox would be better, as it would reduce the overall code required by the page. Google:

jQuery lightbox

to find possibilities. You will have to use the same version of jQuery for whatever jQuery based lightbox script you choose and for your other jQuery based script(s). Even if they don't use the same version, they probably can all agree on one, or be made to.

If you go with lightbox 2.04a, you will need to put jQuery first on the page and follow it with:


<script type="text/javascript">
jQuery.noConflict();
</script>

Your script(s) that use jQuery must be able to function in noConflict mode though. Otherwise they won't work. They may be, if not, they can probably be able to be made to do so fairly easily.

Also, since version 2.04a of lightbox is a complete update, you will need to download and install all of the new files. Of the scripts in the js folder, only imagemotion.js is not required for a basic installation.


*Lightbox 2.04a:

http://home.comcast.net/~jscheuer1/side/lightbox2.04a/

First introduced here:

http://www.dynamicdrive.com/forums/showthread.php?p=163470#post163470

dipper85
05-11-2010, 06:39 AM
Great! thanks for the help John. I'll look into both options.