【发布时间】:2009-08-09 03:11:18
【问题描述】:
我不明白为什么下面的代码在 firebug 中给我这个错误
$未定义
谁能解释一下?
<script type="text/javascript" >
$(document).ready(function(){
setTimeout2(function(){
$("#errormsg4").fadeOut("slow", function () {
$("#errormsg4").remove();
}); }, 5000);
});
</script>
<div id="errormsg4">test</div>
【问题讨论】:
-
你在哪里包含 jQuery 库?
-
如果你将 jQuery 与另一个框架(例如 Prototype)一起使用,你必须包含 jQuery,包含 otherFramework,并且在你的内联脚本中,以:jQuery.noConflict(); 开头。跨度>
-
我收到错误
setTimeout2is not defined -
jquery 包含在脚本上方的页面中
-
@jason:我们能看到吗?它显然没有加载它:)
标签: jquery