的CSS
#nextCh:hover{
margin-right:6px;
}
在某些情况下,我想删除此
:hover
事件像这样:
if (indexL == countL) {
$("#nextCh").css(":hover", "remove");
}
最佳答案
像这样做:
#nextCh.withHover:hover {
margin-right:6px;
}
然后将类
withHover
应用于#nextCh
。要删除悬停效果,请删除类
withHover
:$("#nextCh").removeClass("withHover");