Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js detect user mobile

function is_touch_device() {
  return 'ontouchstart' in window // works on most browsers 
      || 'onmsgesturechange' in window; // works on ie10
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #detect #user #mobile
ADD COMMENT
Topic
Name
1+4 =