jquery没有反应

时间:2016-12-14 17:03:49

标签: jquery html5

我正在创建一些应该与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>

1 个答案:

答案 0 :(得分:0)

https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js

它是一个错字 - googleapis,你用的是googkeapis。