2016-12-14 107 views
-1

我創建了幾個段落,應該與jQuery中的按鈕作出反應。jquery沒有反應

當我按下按鈕什麼都沒有發生。

我在這裏做錯了什麼?

我嵌入的jQuery通過使用這個鏈接:

<script src="https://ajax.googkeapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> 

jQuery函數

$(document).ready(function(){ 
    $("button").click(function() { 
    $("#test").hide(); 
    }); 
}); 

HTML

<h2>This is a heading</h2> 
<p>This is a paragraph</p> 
<p id="test">This is another paragraph</p> 
<button>Click me</button> 
+2

使用[瀏覽器控制檯](http://webmasters.stackexchange.com/q/8525)並閱讀錯誤。 – Xufox

+0

很明顯,你似乎沒有包含jquery lib – ScanQR

+2

請在問題本身中包含代碼,而不是圖像 – empiric

回答