[英]Problem with my JavaScript AJAX request in IE8
I have a products range on this site 我在这个网站上有一个产品系列
http://vanquish.websitewelcome.com/~hawko/hawko-lighting/led/ using jQuery 使用jQuery http://vanquish.websitewelcome.com/~hawko/hawko-lighting/led/
In Firefox / Safari, clicking view will allow you to see more details on the product on the right. 在Firefox / Safari中,单击视图将使您可以在右侧查看有关该产品的更多详细信息。 This includes a gallery (if > 1 images), a download specs sheet if one is available and view more details. 其中包括一个图库(如果> 1张图片),一个下载规格表(如果有的话)以及查看更多详细信息。
The JavaScript works like this JavaScript的工作方式如下
id
. 从HTML属性id
获取id
。 Uses regex. 使用正则表达式。 For some reason, my old friend IE (8 & 7 are my concerns) don't get past the throbber spinning indefinitely. 出于某些原因,我的老朋友IE(我担心的是8和7)不会无限期地摆脱烦恼。 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). 我在大约6个月前编写了此JavaScript代码-因此它在我脑海中并不完全新鲜 (或者可能不符合我现在正在编写的内容)。
What am I doing wrong? 我究竟做错了什么?
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: IE抱怨是因为您在showGallery
函数( script.js ,第172行)中设置的background-image
CSS属性没有正确的'url("...")'
格式( 称为URI值 ),因此:
$('#product-gallery').css({
backgroundImage: 'url("' + imagePath + 'thumb-' + images[0] + '")'
});
Instead of : 代替 :
$('#product-gallery').css({backgroundImage: imagePath + 'thumb-' + images[0]});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.