JavaScript Touch and Gesture Events iPhone and Android


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
  2. $("#seletor").bind('touchstart', function(){
  3.  
  4. });
  5. };

URL: http://backtothecode.blogspot.com/2009/10/javascript-touch-and-gesture-events.html, http://davidwalsh.name/detect-iphone

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.