Dzhuneyt
Dzhuneyt

Reputation: 8701

Run Script on Browsers Different Than IE

I want to run a specific jQuery/JS code on any browser but IE.

Currently I am using this, but it does not work in Chrome:

    <!--[if !IE]>
    <script type="text/javascript">
        $(document).ready(function(){
            alert("non ie");
            $("#login_userid").focus();
        });
    </script>
    <![endif]-->

The alert nor the focus part is executed.

Upvotes: 0

Views: 143

Answers (1)

Adam
Adam

Reputation: 623

i think you need

<![if ! IE]>

<![endif]>

Upvotes: 3

Related Questions