Detecting Mobile Devices with JavaScript | A Beautiful Blog
►http://www.abeautifulsite.net/blog/2011/11/detecting-mobile-devices-with-javascript
While I understand and value the concept of feature detection over browser detection, sometimes the need for knowing whether or not we’re dealing with a mobile device arises. For in-depth device checking, you can rely on a complex library such as The MobileESP Project. But for simpler applications, the following snippet can be useful.