iphone ipad ipod Detect


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

execute javaScript only for iphone / ipad / ipod using jQuery, triggered on page load


Copy this code and paste it in your HTML
  1. jQuery(document).ready(function($){
  2. var deviceAgent = navigator.userAgent.toLowerCase();
  3. var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
  4. if (agentID) {
  5.  
  6. // do something special
  7.  
  8. }
  9. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.