Reputation: 548
How to include a java script file based on a condition.
To be more specific, I want to include a JavaScript file that gives JSON support if the browser is IE and the version is less than eight.
Upvotes: 1
Views: 105
Reputation: 311
Use conditional comments http://www.quirksmode.org/css/condcom.html
<!--[if lt IE 8]>
<script src="yourscript.js"></script>
<![endif]-->
Upvotes: 5