I need a if(condition) to verify the browser,
if(iBrowser==1)
{
Code for IE}
else {
code for chrome/safari}
will this function works?
is there any iBrowser object in javascript to check for IE Browsers
I need a if(condition) to verify the browser,
if(iBrowser==1)
{
Code for IE}
else {
code for chrome/safari}
will this function works?
is there any iBrowser object in javascript to check for IE Browsers
try this
var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
// Opera 8.0+
var isFirefox = typeof InstallTrigger !== 'undefined'; // Firefox 1.0+
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
// At least Safari 3+
var isChrome = !!window.chrome && !isOpera; // Chrome 1+
var isIE = /*@cc_on!@*/false || !!document.documentMode; //
Check this link How to detect Safari, Chrome, IE, Firefox and Opera browser?