Detecting IE version directly on Javascript
Hello all, it’s been a while, projects and vacations were imminent so I’ve got few time for writing any article.
Anyway today we’ll speak about something simple but useful, suppose we’re dealing with JS animations but we already know that IE older versions could have trouble and we want to resolve this catching the browser version and putting different code for IE.
Many would probably do a common conditional like this:
<!--[if lt IE 8]>
<script>
do_awesome_stuffs();
</script>
<![endif]-->
which is probably the best solution overall. However since we are dealing with a JS animation we’ll probably prefer to address to the fix directly in the animation function code, so how to detect IE version directly in JS?