Posted By

thiswayup on 10/08/10


Tagged

javascript browser detection webkit


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

beebs93
muzafarova
HelloKit


detect iphone, ipad or ipod via js


 / Published in: JavaScript
 

Was using this to disable certain js functionality as it wasnt working on apple\'s webkit

  1. function appleMobileChk(){
  2. if (/iPhone/.test(navigator.userAgent) || /iPad/.test(navigator.userAgent) || /iPod/.test(navigator.userAgent)){
  3. return true;
  4. }
  5. else{
  6. return false;
  7. }
  8. }

Report this snippet  

You need to login to post a comment.