I use these scripts to repair the errors in IE (Hacks).
There is one for each version.
I know that everything has IE9.js IE8 and 7 but would like to load
only the necessary script to that version of the browser;
Today my code is as follows:
<!--[if lt IE 7]>
<script src="@Url.Content("~/Scripts/IE7.js")"></script>
<script src="@Url.Content("~/Scripts/ie7-squish.js")"></script>
<![endif]-->
<!--[if lt IE 8]>
<script src="@Url.Content("~/Scripts/IE8.js")">IE7_PNG_SUFFIX=".png";</script>
<script src="@Url.Content("~/Scripts/ie7-squish.js")"></script>
<![endif]-->
<!--[if lt IE 9]>
<script src="@Url.Content("~/Scripts/IE9.js")"></script>
<script src="@Url.Content("~/Scripts/ie7-squish.js")"></script>
<![endif]-->
I would not like to use something like <!--[if eq IE 8]> because I do not know how it would behave in such versions as IE8.5.
I do not know if there is else, I searched the internet and did not see anyone commenting on this. But it would be the ideal solution.
Something like this:
<!--[if lt IE 7]>
<script src="@Url.Content("~/Scripts/IE7.js")"></script>
<script src="@Url.Content("~/Scripts/ie7-squish.js")"></script>
<![elseif lt IE 8]-->
<script src="@Url.Content("~/Scripts/IE8.js")">IE7_PNG_SUFFIX=".png";</script>
<script src="@Url.Content("~/Scripts/ie7-squish.js")"></script>
<![elseif lt IE 9]-->
<script src="@Url.Content("~/Scripts/IE9.js")"></script>
<script src="@Url.Content("~/Scripts/ie7-squish.js")"></script>
<![endif]-->
I appreciate the help.
Problem solved.