Is there any function like $(window).width()
that can show the browser name as output?
I search a lot but unable to find this type of function for browser name.
Is there any function like $(window).width()
that can show the browser name as output?
I search a lot but unable to find this type of function for browser name.
I didn't test it in each browser but this code should work:
var browser = navigator.userAgent;
browser = browser.split("/");
browser = browser[2];
browser = browser.split(" ");
browser = browser[browser.length-1];
alert(browser);
Here the link is : http://jsfiddle.net/3erQJ/