Created
July 11, 2016 14:26
-
-
Save robtarr/d4aecbf7f22418c459843f9f92484e27 to your computer and use it in GitHub Desktop.
CSS Animation Events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
element.addEventListener('transitionend', function(e) { | |
let prop = e.propertyName.match(/border-(.*)-color/); | |
if (prop[1]) { | |
console.log(`Border color for ${prop[1]} transitioned`); | |
} | |
}); | |
element.addEventListener('transitionend', function(e) { | |
if (e.propertyName === 'border-top-left-radius') { | |
console.log(`border-radius transitioned`); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment