Skip to content

Instantly share code, notes, and snippets.

@s-hiroshi
Created June 24, 2012 12:31
Show Gist options
  • Save s-hiroshi/2983092 to your computer and use it in GitHub Desktop.
Save s-hiroshi/2983092 to your computer and use it in GitHub Desktop.
JavaScript > Smartphone
<!-- たにぐち まこと 「iPhone+Android スマートフォンサイト制作入門」ASCII -->
<script>
if (((navigator.userAgent.indexOf('iphone') > 0 && navigator.userAgent.indexOf('iPad') == -1) || navigator.userAgent.indexOf('iPad') > 0 || navigator.userAgent.indexOf('Android') > 0) {
document.write('<link ref="stylesheet" href="phone.css">');
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment