【发布时间】:2014-08-31 01:17:15
【问题描述】:
这个简单的 jQuery 代码没有运行。 使用 Chrome,启用 Javascript。
<html>
<body>
<h1>Click for info</h1>
<p>Here is the extra information!</p>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready({
$("p").hide();
$("h1").click(function(){
$(this).next().slideToggle(300);
});
});
</script>
</body>
感谢您提供的任何帮助:)
【问题讨论】:
-
Works jsfiddle.net/e4RvB your ready 缺少函数()
-
没有运行?你怎么知道?你能提供一个jsfiddle吗?
标签: javascript jquery html google-chrome web