這樣寫不是更簡單嗎?
pageC.prototype.closeWindow = function() {
? ? //?
? ? $(".hover").addClass("close").one("animationend webkitAnimationEnd" function(){
? ? ? ? alert("窗戶關(guān)閉")
? ? })
? ??
}
pageC.prototype.closeWindow = function() {
? ? //?
? ? $(".hover").addClass("close").one("animationend webkitAnimationEnd" function(){
? ? ? ? alert("窗戶關(guān)閉")
? ? })
? ??
}
2016-06-21
舉報
2016-08-25
可以,但是因為窗戶分為左右兩個,這樣寫,會執(zhí)行兩次alert,所以可以增加計數(shù)器,當計數(shù)器的值為2時,在執(zhí)行alert