# Check If You Are On a Touch Enabled Device | kirupa.com

**URL:** https://forum.kirupa.com/t/check-if-you-are-on-a-touch-enabled-device-kirupa-com/352240
**Category:** programming
**Created:** [November 23, 2014, 2:55am UTC](https://forum.kirupa.com/t/check-if-you-are-on-a-touch-enabled-device-kirupa-com/352240 "2014-11-23T02:55:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [November 23, 2014, 2:55am UTC](https://forum.kirupa.com/t/check-if-you-are-on-a-touch-enabled-device-kirupa-com/352240/1 "2014-11-23T02:55:23Z")

</div>

by [kirupa](http://www.kirupa.com/me/index.htm) | 23 September 2013

Today's world is more complicated. It is annoyingly filled with input methods that go beyond a mouse and keyboard. You have to deal with iPhones, iPads, tablets, phablets (tablones?), hybrids, and so on that revolve around touch or support touch as a primary input method. There will be times when you need to know in your HTML document whether you are on a device that is touch friendly. In this short article, you will learn how to add a few lines of JavaScript to easily handle such times.

* * *
This is a companion discussion topic for the original entry at [http://www.kirupa.com/html5/check\_if\_you\_are\_on\_a\_touch\_enabled\_device.htm](http://www.kirupa.com/html5/check_if_you_are_on_a_touch_enabled_device.htm)
