Ana Mah
Ana Mah

Reputation: 77

how not loading javascript code in lt IE 9

i use javascript code in project and i want not load this code in lt IE 9. i use this code but its not working:

<!--[if lt IE 9]>
<script type="text/javascript">
....
</script>
<![endif]-->

Upvotes: 0

Views: 101

Answers (3)

brrystrw
brrystrw

Reputation: 471

<!--[if !lt IE 9]>-->
...
<!--<![endif]-->

You can visit this microsoft article to learn how to build more complex conditional comments

Upvotes: 1

Damon
Damon

Reputation: 4524

<!-- Target IE 8 and lower -->
<!--[if lt IE 9]>
    <script type="text/javascript">alert('hello world');</script>
<![endif]-->

So perhaps give this a try:

<!-- Target IE 9 and lower -->
<!--[if lt IE 10]>
    <script type="text/javascript">alert('hello world');</script>
<![endif]-->

Upvotes: 0

nils
nils

Reputation: 1668

try this:

<!--[if gte IE 9]>-->
...
<!--<![endif]-->

Upvotes: 0

Related Questions