我的隐藏类不接受切换类:
function overFx (element, classN) {
if (!element.hasClass('ligado')){
if (!$.browser.webkit && !$.browser.opera){
//TR
element.toggleClass(classN);
} else {
//TD
element.children("td:not(.media)").toggleClass(classN);
}
}
}
//EFEITOS PARA DESTACAR LINHAS:
//MOUSE OVER:
$("tr.destacar:not(.hide)").mouseover(function (){
overFx($(this), "mouseoverTr");
}
);
$(".hide").mouseover(function (){
overFx($(this), "mouseoverTrHide");
}
);
//MOUSE OUT:
$("tr.destacar:not(.hide)").mouseout(function (){
overFx($(this), "mouseoverTr");
}
);
$(".hide").mouseover(function (){
overFx($(this), "mouseoverTrHide");
}
);
我稍后会发布 Jsfiddle。
par 运行良好,$("tr.destacar:not(.hide)")
但 $(".hide")
不是,它应该是!他们在那里,我 console.logged 它,$(this)
返回正是我想要的。