HandiworkNYC.com
HandiworkNYC.com

Reputation: 11114

IE Conditional operator: OR ... if is greater than ie9 or not IE

I want to only include history and ajaxify if the browser is ie9 or greater, OR is not ie:

<!--[if gte IE 9]>
    <script type="text/javascript" src="assets/js/plugins/history.js"></script>
    <script type="text/javascript" src="assets/js/plugins/ajaxify.js"></script>
<![endif]-->

How can I use the OR operator to say this:

<!--[if gte IE 9 | !IE ]> ??

Thanks!

Upvotes: 15

Views: 17930

Answers (2)

HandiworkNYC.com
HandiworkNYC.com

Reputation: 11114

This worked:

    <!--[if gte IE 9 | !IE ]><!-->
        <script type="text/javascript" src="assets/js/plugins/history.js"></script>
        <script type="text/javascript" src="assets/js/plugins/ajaxify.js"></script>
    <![endif]-->

Upvotes: 17

Juan Pablo Rinaldi
Juan Pablo Rinaldi

Reputation: 3504

Yeah, the or operator is: |. You can check this link for further information on conditional comments.

Upvotes: 3

Related Questions