Domanda

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.

È stato utile?

Soluzione

i think you need

<![if ! IE]>

<![endif]>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top