Skip to content Skip to sidebar Skip to footer

Check What Kind Of Browser The User Is Using

I have a website with a few jQuery animations, commands, etc. It runs flawlessly in Google Chrome and Firefox, but is a real pain when it comes to IE. Is there a code I can insert

Solution 1:

You may want to look at this... http://api.jquery.com/jQuery.browser/

I have used this is some of my webpages/sites...

if (!$.browser.mozilla || jQuery.browser.msie) {

//do something....


}

Solution 2:

using jQuery.browser property

refer link

http://api.jquery.com/jQuery.browser/

Solution 3:

If you're already using jQuery, you can use it to detect the browser while implementing jQuery.browser:

Browser info:

<script>
jQuery.each(jQuery.browser, function(i, val) {
  $("<div>" + i + " : <span>" + val + "</span>").appendTo( document.body );
});
</script>

(example taken from the manual)

Solution 4:

It's no nice solution but you could set a variable like isIE = true with conditional comments.

Post a Comment for "Check What Kind Of Browser The User Is Using"