下面这段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"});
});
}

解决方案 »

  1.   

    $()这是javascript的框架jquery的用法
    $("xxx")表示元素xxx,比如$("div")表示所有的div
    $("#xxx")表示id为xxx的元素,比如<div id="xxx"/>
    $(".xxx")标识class是xxx的元素,比如<div class="xxx"/>
      

  2.   

    jquery的语法,$("#AllSort dt").mouseover(function(){ 
    是id=AllSort的元素,下的dt元素,在鼠标经过时添加事件
      

  3.   

    好好看看jquery就明白了~~1楼说的很详细了~~~
      

  4.   

    $() 实际是 Prototype 这个 JavaScript 框架首次使用的,用于方便地通过 ID 获得 DOM 对象。