Skip to main content
Roy Duineveld
search
Menu
  • Home
  • Blog
    • Tips & Trucs
    • Ideeën & Concepten
  • Contact
  • search
Close Search

Touch device detecteren

Door Roy Duineveld5 januari 2013Tips & Trucs
Geen reacties
Share
Share Share Share Pin
Love0

Alleen een klein stukje code om middels Javascript te bekijken of een apparaat touch is of niet. De functie geeft “boolean” terug, ofwel: “true” of “false”.

function is_touch_device() {
	return !!('ontouchstart' in window) // Werkt in de meeste browsers
		|| !!('onmsgesturechange' in window); // Voor IE10
};

Tags:

Javascript

Recent

  • [EN] My hacking history
  • [EN] Laravel 5.5 validated() method on Form Requests
  • [EN] Laravel theme fallback views based on the user
  • [EN] From shared webhosting to your own VPS
  • [EN] Magento 1 cacheleak exploit
  • [EN] Backup your server with AutoMySQLBackup and Duplicity
  • [EN] Free email forwarding
  • [EN] Hacking public GIT repositories
  • [EN] Creating your own WordPress import
  • [EN] WordPress, use version control or not?

Tags

.NET Ajax Android BrowserSync Cloud CodeIgniter Cordova CSS Cygwin Dynamicweb GD Library GIT Google+ Google Adsense Grunt Gulp Hacking HTML HTML5 Icecat Javascript jQuery Laravel Laravel Forge LESS LiveReload Local Storage Magento Mailgun MySQL Phonegap PHP Security Selenium Serverpilot Session Storage Sublime Text TFS Twitter Bootstrap Visual Basic 6 Visual Studio Wamp Windows Wordpress XSS

Suggesties

Volgende bericht

Sublime Text 2 sneltoetsen

Sublime Text 2 sneltoetsen

© 2026 Roy Duineveld.

  • twitter
  • linkedin
  • RSS
  • github
  • instagram
  • stackexchange
Close Menu
  • Home
  • Blog
    • Tips & Trucs
    • Ideeën & Concepten
  • Contact