Skip to content

Instantly share code, notes, and snippets.

@najamkhn
Created April 13, 2014 06:34
Show Gist options
  • Save najamkhn/10571756 to your computer and use it in GitHub Desktop.
Save najamkhn/10571756 to your computer and use it in GitHub Desktop.
(function(W, D, $, ns, _){
_.detectIE11 = function(ua, doc){
/**
*/
if ((ua.match(/MSIE 10.0/i))) {
doc.className = doc.className + " ie10";
} else if((ua.match(/rv:11.0/i))){
doc.className = doc.className + " ie11";
}
return true;
}
})(this, this.document, this.jQuery, dbz = dbz || {}, dbz.shame = dbz.shame || {});
$(function(){
var userAgent = navigator.userAgent,
docElem = document.documentElement;
dbz.shame.detectIE11(userAgent, docElem);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment