2011-10-03 208 views
0

我在IE7和IE8中的jQuery中遇到問題。在所有其他瀏覽器中,腳本工作正常。IE7和ie8中的jQuery問題

當我複製到clipword我發現這個錯誤:

Webpage error details

User Agent: 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

Message: 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

Message: 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時,當您點擊其中一個圖像時,會打開兩個圖像。然後,您將能夠看到確切的問題。

+1

它與您在腳本中調用jQuery所做的一些調用有關。你需要找出它是哪個電話。 –

回答

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" 

我甚至獲得當一些腳本試圖從URL

http://indivar.info/AnimatedContentMenu/undefined 404 (Not Found) 

檢查該腳本試圖在這裏得到的值取東西,但返回undefined未定義錯誤。

如果您認爲jquery聲明是問題,請下載jquery源代碼,而不是從Google獲取。

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

複製粘貼到你的服務器上的文件,並從那裏運行它。請記住在依賴jQuery的其他腳本之前聲明jquery。

+0

你好,我想你點擊了其他圖片,請點擊收藏後顯示給您的圖片之一 –

3

當我查看鏈接時,我發現一個錯誤Could not get the position property. Invalid argument.我通過堆棧跟蹤對其進行了跟蹤,看起來您的問題來自您的jquery.template.js文件中的函數。在該功能中,您撥打paramHeading.position='absolute';,這不是.position()的正確用法。

jQuery Position doc

它看起來像你想申請這可以通過使用類似paramHeading.css('position','absolute');

它也像你想動畫元素被設置爲position:absolute由應用了CSS位置屬性,該屬性我很確定jQuery不能這樣做。首先進行設置然後使您的元素動起來將是一個好主意。