2012-09-03 107 views
-8

這真的很奇怪。如果我去我的網站www.example.com jQuery不會在我的索引文件/主頁上工作。但是,如果我輸入www.example.com/index.html,jQuery加載就好了。任何想法正在發生或如何解決這個問題?jQuery不能在主頁上工作

http://www.japaneselanguagefriend.com

http://www.japaneselanguagefriend.com/index.html

+1

您擁有'www.example.com'?真棒!沒有jQuery代碼!我們都不知道您的主頁如何獲得腳本! :P –

+1

當您在任一頁上單擊查看源時,是否有區別? – smartcaveman

+0

你有另一個名爲'index'的文件,像'index.php',可能沒有你的更新代碼嗎? –

回答

1

你試圖使用jQuery你包括它之前:

<script>$(document).ready(function() { 
    $("a.register").fancybox({ 
     'type': 'iframe' 
    }); 
}); 
</script> 
<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script> 

確保這是第一次:

<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script> 
+0

非常感謝。我會記住,它需要先行或不會正確加載。我非常感謝你的幫助! –

1

http://www.japaneselanguagefriend.com/

有些標籤是不存在的,例如:<body>標籤

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
    "http://www.w3.org/TR/html4/strict.dtd"> 
<html> 

<head> 
    <title>Japanese Language Friend - An Artistic Approach to Learning Japanese! </title> 
    <META name="description" content="Learn Japanese by stimulating artwork! Join our community and lay down the first stepping stone to improving your Japanese language skills"><META name="keywords" content="Japanese art, Japanese, Japan, Learning Japanese, learning japanese, study japanese, fluent japanese, japanese language friend, help with japanese, amazon japanese language, second language, japanese language community, japanese language friends, japanese language friend"> 
</head> 
<frameset rows="100%,*" border="0"> 
    <frame src="http://japanesefriend.zxq.net" frameborder="0" /> 
    <frame frameborder="0" noresize /> 
</frameset> 

<!-- pageok --> 
<!-- 07 --> 
<!-- --> 
</html> 
+0

非常感謝您的幫助! –