Detecting iPad/iPhone/iPod with javascript


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

A tiny snippet on how to easily detect iPad/iPhone/iPod using javascript.


Copy this code and paste it in your HTML
  1. if (navigator.userAgent.match(/iP(ad|hone|od)/i)) {
  2.  
  3. [Here goes the magic.. ]
  4.  
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.