Skip to content

Instantly share code, notes, and snippets.

@johnmichel
Created May 18, 2010 16:00
Show Gist options
  • Save johnmichel/405159 to your computer and use it in GitHub Desktop.
Save johnmichel/405159 to your computer and use it in GitHub Desktop.
Checks for the devil of all browsers
/* could be done using jQuery's .css() function */
#browserupgrade {
background-color: #f0ffaf;
}
// lets see what you're running
function iecheck() {
$(document).ready(function(){
var $browserupgrade = $('#browserupgrade');
if (jQuery.browser.msie && parseInt(jQuery.browser.version,10) <= 6) {
var message = 'Ahoy hoy! You should download <a href=\'http:\/\/www.google.com/chrome/\'>Chrome</a>, <a href=\'http:\/\/www.getfirefox.com/\'>Firefox</a>, <a href=\'http:\/\/www.apple.com/safari/\'>Safari</a>, or <a href=\'http://www.opera.com/browser/download/\'>Opera</a>.';
$($browserupgrade).html(message).after("<br />");
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment