Return to Snippet

Revision: 25885
at April 13, 2010 07:54 by humanoid


Initial Code
jQuery(document).ready(function($){
	var deviceAgent = navigator.userAgent.toLowerCase();
	var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
	if (agentID) {

        // do something special
 
	}
});

Initial URL


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

Initial Title
iphone ipad ipod Detect

Initial Tags
browser, jquery, iphone

Initial Language
jQuery