/ Published in: jQuery
                    
                                        
execute javaScript only for iphone / ipad / ipod using jQuery, triggered on page load
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
jQuery(document).ready(function($){
var deviceAgent = navigator.userAgent.toLowerCase();
var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
if (agentID) {
// do something special
}
});
Comments
 Subscribe to comments
                    Subscribe to comments
                
                