When you are developing web sites for compatibility all browsers and mobile devices.But sometimes you want to detect who viewing the site that using device is consisting with touch-screen or not.Here is a perfect,tested and easy example to detect touch screen devices.This was tested in lot of web browsers.

Also this method can be use to detect touch-screen devices.

You can view Modernizr Touch events information from here.