0

In a condition I want to do something based on browser, as some of things are not working in IE, I would like to do something except for the Chrome.

Like below, I have siple click event and showing DIV, but instead in

$('.testBtn').click(function(){
    //for Chrome only
    $(".divContent").show();
    //for IE and Mozilla
    $(".divContent").show(
        function(){
        //do something
        });
});

<div class="divContent" style="display:none">
    This is Test content
</div>

How do I do this?

Sanjeev Kumar
  • 3,113
  • 5
  • 36
  • 77

1 Answers1

-1

You can get the user-agent send by the browser with the function :

navigator.userAgent

Then you'll just have to make condition depending on the result. See doc here

kevinniel
  • 1,088
  • 1
  • 6
  • 14