Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bulbul84/c3348b86716f0732129214872e8f7b27 to your computer and use it in GitHub Desktop.
Save bulbul84/c3348b86716f0732129214872e8f7b27 to your computer and use it in GitHub Desktop.
jQuery(document).ready(function($){
var deviceAgent = navigator.userAgent.toLowerCase();
var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
if (agentID) {
// mobile code here
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment