Posted By

tomdowning on 09/21/11


Tagged


Versions (?)

Javascript is iPad/iPhone


 / Published in: JavaScript
 

check if browser is iPad or iPhone

  1. function isiPhone(){
  2. return (
  3. (navigator.platform.indexOf("iPhone") != -1) ||
  4. (navigator.platform.indexOf("iPod") != -1)
  5. );
  6. }
  7. function isiPad(){
  8. return (
  9. (navigator.platform.indexOf("iPad") != -1)
  10. );
  11. }

Report this snippet  

You need to login to post a comment.