Skip to content

Detecting if browser's touch APIs implemented whether or not the current device has a touchscreen.

License

Notifications You must be signed in to change notification settings

hesambayat/is-touch-device-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Is Touch Device Javascript

Is Touch Device Javascript is a fast, micro size (148bytes) and self-initializing touch browser detector. It creates a global boolean variable (IS_TOUCH_DEVICE) which detects if browser's touch APIs implemented whether or not the current device has a touchscreen.

Installing from Bower

$ bower install is-touch-device --save

Documentation

Usage

if ( IS_TOUCH_DEVICE ){
    console.log('Touch APIs have detected...');
}

Running the test

$ npm start

... and then open a browser and go to http://localhost:8080

How to build

$ npm run build

Building details

  • Minified and mangled: gulp-uglify
  • Rename: gulp-rename

License MIT

Copyright (c) 2017 Hesam Bayat http://pixudio.com

About

Detecting if browser's touch APIs implemented whether or not the current device has a touchscreen.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published