Jquery lightbox problems in Internet Explorer
I am using the lightbox script from "Jquery:Novice to Ninja" and it works very well in Firefox and Opera but not in IE8.
The problem, I think is because I am using PHP to pull the picture names from a file. There are around 40 pictures so I didn't want to name them all manually.
The PHP script is here;-
$jpgs = glob("gallery_images/*.jpg");
foreach ($jpgs as $jpg)
$file = basename($jpg, ".jpg");
echo("<li><a href='gallery_images/$file.jpg' class='lightbox'><img src='gallery_images/$file.jpg' width='200' height='130'></a>$file</a></li>");
This easily produces a nice page of thumbnails and clicking on any brings up the bigger picture in lightbox but not in IE.
It seems that IE needs another set of pictures to load from so the filename od the <a href=image> needs to be different to the <src=image> filename which makes more work.
Is there a work around to make this work as well in IE as it does in firefox.
The page can be seen at http://tinyurl.com/66axyny
Also as an aside. When the lightbox starts it removes the scroll bar which has the effect of moving the page to the right. Is there a way to add a right margin to replace the scroll bar to stop this happening?