2012-03-08 104 views
5

我碰到過一個相當普通的問題,但我解決不了。
我試圖修復jQuery腳本幾十次,但它不會工作。它幾個星期後突然停止工作。

我認爲我包含了jQuery腳本,並且測試了該網站是否還活着。
然而,it seems like my browser or server ain't loading it with the site load ...

http://i.imgur.com/HhFy2.png

它加載我的谷歌Analytics(分析)腳本完全正常,但它不會加載jQuery腳本。即使我自己主持我。

這是代碼

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> 
<script src="scripts/ganalytics.js" type="text/javascript"></script> 

<script type="text/javascript"> 
    $(document).ready(function(){ 
    $('img').hover(function(){ 
     $(this).data('jpg', $(this).attr('src')); 
     $(this).attr('src',$(this).data('gif')); 
    }, 
    function(){ 
     $(this).attr('src',$(this).data('jpg')); 
    }); 
    }); 
</script> 

在這裏,它產生於第5行或line #15 in my website

http://i.imgur.com/U8QwW.png

我在這裏失去了錯誤,我該如何解決這個問題?它工作得很好,然後突然,繁榮,從無到有,停止工作。一直在努力解決這個問題,但我無法弄清楚。

乾杯,感謝閱讀

編輯:包括JSFiddle,因爲它是在意見中的要求。希望我包含必要的代碼。

+1

你在屏幕截圖中有什麼模糊的東西?這是一個街景圖像嗎? ;) – PeeHaa 2012-03-08 23:07:29

+0

如果你移動'

相關問題