为什么不能隐藏?

navy_chen 2009-11-17 10:34:37
$(
function()
{
var Category = function ShowCategory()
{
if (this.CategoryConten == null)
{
var left = $($($("#search_product").parent()[0]).parent()[0]).css("left");
this.CategoryConten = document.createElement("div");
$(this.CategoryConten).attr("class", "categoryContent")
$(this.CategoryConten).css("left", (screen.width - 960) / 2 - 10);
$(this.CategoryConten).html(new Date().getMilliseconds());
document.documentElement.appendChild(this.CategoryConten);
return this.CategoryConten;
}
else
{
return this.CategoryConten;
}
};

$("#search_product").mouseover(function() { $(Category).css("display", "block"); });
$("#search_product").mouseout(function() { $(Category).css("display", "none"); });
}
);
鼠标移到search_product时可以显示Category
为什么鼠标移开search_product时不可以隐藏Category呢?
...全文
63 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
sohighthesky 2009-11-17
  • 打赏
  • 举报
回复
新手,没见过这语法 :
var Category = function ShowCategory()

87,994

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧