jblz
jblz

Reputation: 1029

Lightbox with multiple images not working in IE

I'm trying to use standard lightbox. Everything was working perfect until I tried to add multiple images to one 'set'.

Just using standard syntax with no mods

<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/lightbox.js"></script>
<link href="css/lightbox.css" rel="stylesheet" />

<a href="images/famroom.jpg" rel="lightbox[rooms]" title="Family Room"><img src="images/famroom.jpg" alt="Bedroom" width="250" height="188" class="fltrt"></a>Accommodation</h4>    
<a href="images/twinroom.jpg" rel="lightbox[rooms]" title="Twin Room"></a>
<a href="images/doubleroom.jpg" rel="lightbox[rooms]" title="Double Room"></a>
<a href="images/bathroom.jpg" rel="lightbox[rooms]" title="Bathroom"></a>

The above doesn't work. It shows up as a broken image, when I click I just see a pure white image.

However this (for example) works fine.

<a href="images/famroom.jpg" rel="lightbox" title="Family Room"><img src="images/famroom.jpg" alt="Wedding Table" width="250" height="188" class="fltlft"></a>

Its only IE8 I'm having this problem (haven't tried 6, 7 or 9), it works perfect in FF and Chrome. No other scripts are in use on the page.

Upvotes: 0

Views: 1957

Answers (2)

jblz
jblz

Reputation: 1029

There was a strange resolution to this one. It turns out this just didn't work locally.

When I uploaded it to the server it worked perfectly.

Upvotes: 0

N1ck
N1ck

Reputation: 2001

I have tested on IE8 and my example seems to be working, perhaps compare to my example and see if you have maybe missed something?

http://jsfiddle.net/n1ck/RcA3a/3/

I am including (taken from their demo page):

 <link rel="stylesheet" href="http://lokeshdhakar.com/projects/lightbox2/css/lightbox.css"   type="text/css" media="screen">
 <script src="http://lokeshdhakar.com/projects/lightbox2/js/jquery-1.7.2.min.js"></script>
 <script src="http://lokeshdhakar.com/projects/lightbox2/js/lightbox.js"></script>

Upvotes: 1

Related Questions