下面这段js代码是什么意思?
function showSubCategory()
{
$("#AllSort dt").mouseover(function(){
var newDiv=document.getElementById("EFF_div_"+this.id.substr(7));
this.className="curr";
if (newDiv){
newDiv.style.display="block";
return;
}else{
var CLASS_NAME=($.browser.msie?($.browser.version>"7.0")?"class":"className":"class");
var newDiv_wrap=document.createElement("div");
newDiv_wrap.setAttribute(CLASS_NAME,"pop_wrap");
newDiv_wrap.setAttribute("id","EFF_div_"+this.id.substr(7))
var newDiv=document.createElement("div");
newDiv.setAttribute(CLASS_NAME,"pop");
newDiv_wrap.appendChild(newDiv);
newDiv.innerHTML=this.nextSibling.innerHTML;
this.parentNode.insertBefore(newDiv_wrap,this);
newDiv_wrap.style.display="block";
}
//test/
$(".pop_wrap").mouseover(function(){
$(this).css({"display":"block"});
this.nextSibling.className="curr";
}).bind("mouseleave",function(){
$(this).css({"display":"none"});
this.nextSibling.className="";
})
//test end/
}).bind("mouseleave",function(){
this.className=(this.nextSibling.className=="Dis")?"curr":"";
$(".pop_wrap").css({"display":"none"});
});
}
function showSubCategory()
{
$("#AllSort dt").mouseover(function(){
var newDiv=document.getElementById("EFF_div_"+this.id.substr(7));
this.className="curr";
if (newDiv){
newDiv.style.display="block";
return;
}else{
var CLASS_NAME=($.browser.msie?($.browser.version>"7.0")?"class":"className":"class");
var newDiv_wrap=document.createElement("div");
newDiv_wrap.setAttribute(CLASS_NAME,"pop_wrap");
newDiv_wrap.setAttribute("id","EFF_div_"+this.id.substr(7))
var newDiv=document.createElement("div");
newDiv.setAttribute(CLASS_NAME,"pop");
newDiv_wrap.appendChild(newDiv);
newDiv.innerHTML=this.nextSibling.innerHTML;
this.parentNode.insertBefore(newDiv_wrap,this);
newDiv_wrap.style.display="block";
}
//test/
$(".pop_wrap").mouseover(function(){
$(this).css({"display":"block"});
this.nextSibling.className="curr";
}).bind("mouseleave",function(){
$(this).css({"display":"none"});
this.nextSibling.className="";
})
//test end/
}).bind("mouseleave",function(){
this.className=(this.nextSibling.className=="Dis")?"curr":"";
$(".pop_wrap").css({"display":"none"});
});
}
解决方案 »
- java定时器使用的中的问题
- 如何用jdbc,jsp,mysql实现上传和下载啊?
- ECshop模板问题 急~!
- 不是一般的session问题
- 浏览器发送请求怪象
- 我写的分页程序为什么只有第一页,第二页第三页都无法显示呢,那位高手帮我看看谢谢!
- jsp连接sql server2000速度很慢,是驱动的原因吗?
- 付费请人处理access数据库中的数据导入到mysql数据库中
- JSP中用form传值奇怪的为null
- 如何将显示的表单把它转成Word文件,并在IE里显示该Word文件。
- struts2+ajaxanhwhere 提示 AjaxAnyWhere error content-type in not text/xml[]
- 我有个jsp的问题
$("xxx")表示元素xxx,比如$("div")表示所有的div
$("#xxx")表示id为xxx的元素,比如<div id="xxx"/>
$(".xxx")标识class是xxx的元素,比如<div class="xxx"/>
是id=AllSort的元素,下的dt元素,在鼠标经过时添加事件