I need to change out some buttons and text on a mobile website depending on whether the user is viewing it on an Android or iOS browser. Is there a reliable way to perform t
I have used this for awhile. Simple check to see return true or false based on is a mobile device.
var isMobile = (/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Windows Phone/i.test(navigator.userAgent)) ? true : false;