The if condition below I think it says - if the browser is IE and IE browser version is newer than 9, but I don\'t have IE 9 to test it so it is hard to know the correct out
There's an even easier method.
Since this is a comment, it will be ignored by all other browsers except IE.
var IE;
//@cc_on IE = navigator.appVersion;
Then just use this in you'r script to detect all IE versions.
if (IE) {
//This is IE.
}
else {
//This is NOT IE.
}
Or match against any version like this:
if (IE <= 6) {}, if (IE < 9) }, if (IE == 7) {} etc etc...
Here's the source where i found these types of conditionals: http://www.javascriptkit.com/javatutors/conditionalcompile.shtml