transitionend
fires for each property transitioned, in your case top
and left
.
You can access the property associated with the event at event.propertyName
.
There's no "transitionsend" event, so you will probably need some hackiness such as filtering the transitionend
callback handling for only one of the transitioned properties. E.g.:
function (event) {
if (event.propertyName == 'top') {
//put your code here
}
});
ps. No browser fires the MSTransitionEnd
event. It was at some point in the MS docs, but sometime before the IE10 beta release it was replaced by the standard transitionend
event.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…