Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript ***HOW TO DETECT MOBILE DEVICES USING JQUERY*** Re: ***HOW TO DETECT MOBILE DEVICES USING JQUERY***

#132043
godesign
Member

If you don’t need to separate the handling of the device I prefer using this one line:

function isMobile() { return (‘ontouchstart’ in document.documentElement);}

Note:
jQuery.browser is deprecated since v1.3 and removed in v1.9
http://api.jquery.com/jQuery.browser/