Created
January 25, 2012 00:06
-
-
Save pamelafox/1673684 to your computer and use it in GitHub Desktop.
IE ChromeFrame conditional prompt and alert
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
<!--[if lt IE 7]> | |
<script type="text/javascript" | |
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script> | |
<script> | |
// The conditional ensures that this code will only execute in IE, | |
// Therefore we can use the IE-specific attachEvent without worry | |
window.attachEvent("onload", function() { | |
CFInstall.check({ | |
mode: "overlay" | |
}); | |
}); | |
</script> | |
<![endif]--> | |
<!--[if lt IE 9]> | |
<div class="alert-message warning"> | |
<span class="icon-reminder"></span> | |
Our site works best in <a href="http://browsehappy.com/">modern browsers</a>. | |
We recommend upgrading or installing the | |
<a href="http://www.google.com/chromeframe">Google Chrome Frame</a> plugin for the best experience. | |
</div> | |
<![endif]--> |
I configured it per the ChromeFrame docs, the standard:
I tested in browserstack and it worked as I expected.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how did you configure the page head to correspond to this?