Skip to content

Instantly share code, notes, and snippets.

@streunerlein
Created June 15, 2012 10:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save streunerlein/2935794 to your computer and use it in GitHub Desktop.
Save streunerlein/2935794 to your computer and use it in GitHub Desktop.
function GetVendorPrefix(arrayOfPrefixes) {
var tmp = document.createElement("div");
var result = "";
for (var i = 0; i < arrayOfPrefixes.length; ++i) {
if (typeof tmp.style[arrayOfPrefixes[i]] != 'undefined'){
result = arrayOfPrefixes[i];
break;
}
else {
result = null;
}
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment