I got this for IE browsers,
var IE = /*@cc_on!@*/false;
if (IE) {
    // IE.
} else {
    // Others.
}
but how would i do the same for iphone/ipad/mobiledevices? (do not want to redirect to another page on any mobile devices)
You may want to check the user agent string as follows:
var userAgent = navigator.userAgent;
if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i)) {
   // iPad or iPhone
}
else {
   // Anything else
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With