Webkit transitionEnd event grouping

前端 未结 5 1757
逝去的感伤
逝去的感伤 2021-01-07 07:08

I have a HTML element to which I have attached a webkitTransitionEnd event.

function transEnd(event) {
    alert( \"Finished transition!\" );

}

var node =         


        
5条回答
  •  太阳男子
    2021-01-07 07:35

    just remove the event:

    var transEnd = function(event) {
       event.target.removeEventListener("webkitTransitionEnd",transEnd);
    };
    

    it will fire for the first property and not for the others.

提交回复
热议问题