Created
January 27, 2014 08:22
-
-
Save larswittenberg/8644810 to your computer and use it in GitHub Desktop.
IE Detection with jQuery > 1.9
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
// Quelle: http://grochtdreis.de/weblog/2014/01/27/browserabfrage-zu-jquery-zurueckholen/ | |
// bringt $browser zum modernen jQuery zurück | |
// brings back $.browser to modern jQuery | |
jQuery.browser={}; | |
(function(){ | |
jQuery.browser.msie=false; | |
jQuery.browser.version=0; | |
if(navigator.userAgent.match(/MSIE ([0-9]+)\./)){ | |
jQuery.browser.msie=true;jQuery.browser.version=RegExp.$1; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment