I can check for iPhone with this code:
(navigator.userAgent.match(/iPhone/i))
But I want to target Windows Phone with this userAgent:
function isIEMobile() { var regExp = new RegExp("IEMobile", "i"); return navigator.userAgent.match(regExp); }