Skip to content

Instantly share code, notes, and snippets.

@olitomas
Forked from Andrinoid/utils.js
Created March 15, 2016 10:23
Show Gist options
  • Save olitomas/6a8e05c1774b7f4ab465 to your computer and use it in GitHub Desktop.
Save olitomas/6a8e05c1774b7f4ab465 to your computer and use it in GitHub Desktop.
//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