0

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 Answer 1

1

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]});
Sign up to request clarification or add additional context in comments.

1 Comment

Wow, I would have never thought of that. Thanks a bunch!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.