Skip to content

Instantly share code, notes, and snippets.

@hfknight
Created July 1, 2013 14:59
Show Gist options
  • Save hfknight/5901593 to your computer and use it in GitHub Desktop.
Save hfknight/5901593 to your computer and use it in GitHub Desktop.
workaround for $.browser.msie and $.browser.version on jQuery 1.9.x, but exclusively for detecting IE.
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