ie7和ie8中的Jquery问题

时间:2011-10-03 11:28:13

标签: jquery

我在IE7和IE8中遇到jQuery问题。在所有其他浏览器中,脚本运行正常。

当我复制到clipword时,我发现了这个错误:

  

网页错误详情

     

用户代理Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Timestamp: Mon, 3 Oct 2011 11:24:50 UTC

     

消息Could not get the position property. Invalid argument. Line: 16 Char: 79183 Code: 0 URI: http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js

     

消息Could not get the position property. Invalid argument. Line: 16 Char: 79183 Code: 0 URI: http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js

如果我尝试使用完整的非缩小jQuery(1.5.1),它仍会产生错误。

该网站位于here。当您单击Collection时,单击其中一个图像时会打开两个图像。然后,您将能够看到确切的问题。

2 个答案:

答案 0 :(得分:3)

当我查看该链接时,我发送了一个错误Could not get the position property. Invalid argument.我在堆栈跟踪中向下搜索了它,您的问题似乎来自jquery.template.js函数中的animateHeadingDesc文件。在该功能中,您拨打了paramHeading.position='absolute';,这不是.position()的正确用法。

jQuery Position doc

看起来你想要应用一个CSS位置属性,可以通过paramHeading.css('position','absolute');

这样的方式应用

看起来你也试图动画设置为position:absolute的元素,我很确定jQuery不能这样做。首先设置它然后为元素设置动画是个好主意。

答案 1 :(得分:0)

我收到很多丢失图像的错误,例如当我点击收藏中的图片时。

"NetworkError: 404 Not Found - http://indivar.info/AnimatedContentMenu/kitchen2/2.jpg"
2.jpg
"NetworkError: 404 Not Found - http://indivar.info/AnimatedContentMenu/kitchen2/1.jpg"
1.jpg
"NetworkError: 404 Not Found - http://indivar.info/AnimatedContentMenu/kitchen2/3.jpg"
3.jpg
"NetworkError: 404 Not Found - http://indivar.info/AnimatedContentMenu/kitchen2/4.jpg"
4.jpg
"NetworkError: 404 Not Found - http://indivar.info/AnimatedContentMenu/kitchen2/5.jpg"
5.jpg
"NetworkError: 404 Not Found - http://indivar.info/AnimatedContentMenu/kitchen2/6.jpg"

当某些脚本试图从网址

中获取内容时,我甚至会收到一个未定义的错误
http://indivar.info/AnimatedContentMenu/undefined 404 (Not Found)

检查哪个脚本尝试在此处获取值,但返回undefined。

如果您认为jquery声明存在问题,请下载jquery源代码而不是从谷歌获取它。

http://code.jquery.com/jquery-1.6.4.min.js

将粘贴复制到服务器上的文件中并从那里运行它。请记住在依赖于jquery的其他脚本之前声明jquery。