-
-
Save olitomas/6a8e05c1774b7f4ab465 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//This is a comment | |
function cssAnimationEvent(element, type, callback) { | |
var self = this; | |
var pfx = ["webkit", "moz", "MS", "o", ""]; | |
for (var p = 0; p < pfx.length; p++) { | |
if (!pfx[p]) type = type.toLowerCase(); | |
element.addEventListener(pfx[p]+type, function() { | |
callback(element); | |
}, false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment