Easiest way to determine if user is on mobile device

desktop, javascript, mobile

Solution

Check this http://detectmobilebrowsers.com/

Work for Javascript, jQuery etc.

Problem

I'm showing a notification bar on my website, and frankly, it doesn't work well when its on a mobile device. I'd like to show the bar ONLY for desktop users. What is the easiest way to determine if a user is on desktop or on mobile?

Original source