I\'ve written a jQuery plug-in that\'s for use on both desktop and mobile devices. I wondered if there is a way with JavaScript to detect if the device has touch screen capa
Extent jQuery support object:
support
jQuery.support.touch = 'ontouchend' in document;
And now you can check it anywhere, like this:
if( jQuery.support.touch ) // do touch stuff