PDA

View Full Version : Lightbox 2


WotNow
08-26-2009, 11:47 AM
Hi! I have used lightbox 2 on my clients website and all is working perfectly. Now I have gone to use it on my own site and cant get it to work, grrr!

This is the bit that I may have wrong:

Check the CSS and make sure the referenced prev.gif and next.gif files are in the right location. Also, make sure the loading.gif and close.gif files as referenced near the top of the lightbox.js file are in the right location.

I know the css images are in the right place, because I did a browse for url but you cant do that with the java script file, so I am not sure about the image paths to lightbox.js I simply cut and pasted the path from css to js

Java Script File
LightboxOptions = Object.extend({
fileLoadingImage: '../images2/loading.gif',
fileBottomNavCloseImage: '../images2/closelabel.gif',

CSS File

#prevLink:hover, #prevLink:visited:hover { background:url(../images2/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background:url(../images2/nextlabel.gif) right 15% no-repeat; }

The other thing it may be is that I have lots of java script files in the head of my document:

<title>Services offered by Kimberley Web Design</title>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="sliding_effect.js"></script>
<script type="text/javascript" src="swfobject.js"></script>
<link href="Services.css" rel="stylesheet" type="text/css" />
<link rel="Shortcut Icon" href="/KWDFavicon.ico" />

</head>

are any of these conflicting with each other?

Have been going back and forth with this for hours and not getting it to work. I really appreciate any help given.

http://www.kimberleywebdesign.com.au/Services/Services.html

Corrosive
08-26-2009, 12:14 PM
Hiya

It may be script conflicts. If you are already using JQuery framework then consider Thickbox http://jquery.com/demo/thickbox/ as this will run with the JQuery you have in place currently (no need to reference it again). I don't think that Thickbox is quite as 'pretty' as lightbox2 but that's a personal preference.

domedia
08-26-2009, 06:20 PM
You're using three js frameworks, prototype, scriptaculous and jQuery. My guess is that there's some conflict. You should only use one.

WotNow
08-26-2009, 09:47 PM
Thanks so much. So my image paths are correct? Had some trouble getting thickbox to work in clients website but will give it another go.

Corrosive
08-27-2009, 07:23 AM
So my image paths are correct?

I don't know what your site structure is so I can't really comment. Sorry.

WotNow
08-27-2009, 11:47 AM
Kimberley Web Design>Services>images2. If I have this correct then I know its a conflict with Java Scripts. And then I have to try to get Thickbox to work. Thanks soooo much!