如何使用緩解或addClass();
時間延遲?延遲添加類2秒懸停()
$("#date_1").hover(
function() {
$(this).addClass("door");
$(this).addClass("doorstatic", "slow"); // after 2seconds i want to add this class during the hover
},
function() {
$(this).removeClass("door");
$(this).removeClass("doorstatic"); // both classes are instantly removed when hover off
}
);
即使您選擇在2秒鐘之前移除鼠標(鼠標離開),懸停後(鼠標進入)2秒鐘後,「門禁」級別可能會被添加。 – Stefan
但是我有幾個..我有一個基本的日曆和有一排箱子。用戶可以使用鼠標和流過很多......有不止一個盒子旁邊頁EAC等.. – TheBlackBenzKid
尼斯!真像數據的使用'()'和''||操作者:) – Stefan