Posted By

mecha on 05/27/11


Tagged

javascript


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

bcmoney


Detect ALL mobile devices with JavaScript


 / Published in: JavaScript
 

  1. var isMobileDevice = function () {
  2. return !!(navigator.userAgent.toLowerCase().match(/(iPhone|iPod|blackberry|android 0.5|htc|lg|midp|mmp|mobile|nokia|opera mini|palm|pocket|psp|sgh|smartphone|symbian|treo mini|Playstation Portable|SonyEricsson|Samsung|MobileExplorer|PalmSource|Benq|Windows Phone|Windows Mobile|IEMobile|Windows CE|Nintendo Wii)/i));
  3. };

Report this snippet  

You need to login to post a comment.