【发布时间】:2011-05-19 02:59:44
【问题描述】:
我在本地工作,我刚刚将 firebug 更新到了新版本。在更新之前,无论我使用 js 犯了什么错误,firebug 都会向我显示哪一行代码没有运行(这样我就可以理解我在哪里犯了错误)。
现在我的网站崩溃了,但我没有收到任何关于 JS 无法从 firebug 运行的消息。有什么改变吗? 脚本已启用。
这是代码
$("#cv").hover(
// when the mouse enters the box do...
function(){
$("#hover-cv").css("z-index":"6");
aniCircle(1, $(this), "#hover-cv", {scale:"1", "opacity":"0"}, {scale:"1.3", "opacity":"1"});
},
// when the mouse leaves the box do...
function() {
$("#hover-cv").css("z-index":"4");
aniCircle(0, $(this), "#hover-cv", {scale:"1", "opacity":"0"});
}
);
造成错误的是脚本 "$("#hover-cv").css("z-index":"6");"和 "$("#hover-cv").css("z-index":"4");"
我不明白为什么 Firebug 不警告我有问题。不仅仅是解决方案,我还担心 firebug 不会在 js 错误时警告我。
【问题讨论】:
标签: jquery firebug script-debugging