views:

133

answers:

1

I have a products range on this site

http://vanquish.websitewelcome.com/~hawko/hawko-lighting/led/ using jQuery

In Firefox / Safari, clicking view will allow you to see more details on the product on the right. This includes a gallery (if > 1 images), a download specs sheet if one is available and view more details.

The JavaScript works like this

  • Get preliminary info from list (disable JavaScript to see what I mean)
  • Get id from HTML attribute id. Uses regex.
  • Get JSON from server (extra images, spec sheet filename)
  • Show info to user

For some reason, my old friend IE (8 & 7 are my concerns) don't get past the throbber spinning indefinitely. I've tried quite a bit - but I am as a lost as to why. I coded this JavaScript about 6 months ago - so it's not exactly fresh in my mind (or probably up to scratch to what I may be writing nowadays).

What am I doing wrong?

+1  A: 

IE is complaining because you are setting the background-image CSS property without the proper 'url("...")' format (known as URI values), in your showGallery function (script.js, line 172) put:

$('#product-gallery').css({
  backgroundImage: 'url("' + imagePath + 'thumb-' + images[0] + '")'
});

Instead of :

$('#product-gallery').css({backgroundImage: imagePath + 'thumb-' + images[0]});
CMS
Wow, I would have never thought of that. Thanks a bunch!
alex