Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

Conditional compilation in IE

I normally know about conditional compilation of JS in IE using <!--[if gt IE 6] --> but here is something new I figured out today.

var IE;
//@cc_on IE = parseFloat(navigator.appVersion);

The best part here is that the JS code stays in your JS files and does not uglify the HTML if you ever have to use conditional compilation. Here is some more information about it from MSDN article Conditional Compilation (Windows Scripting - JScript).


Don't be the product, buy the product!

Schweinderl