Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sintaxi
Created March 1, 2009 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sintaxi/72476 to your computer and use it in GitHub Desktop.
Save sintaxi/72476 to your computer and use it in GitHub Desktop.
<link id="css" href="stylesheets/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8">
(function(){
var ua = navigator.userAgent;
if(ua.match("iPhone") || ua.match("Android")){
document.getElementById("css").href = "stylesheets/mobile.css";
var meta = document.createElement("META");
meta.setAttribute('content','width=320; initial-scale=1.0; maximum-scale=2.0;');
meta.setAttribute('name','viewport');
var n = document.getElementsByTagName('head')[0];
n.appendChild(meta);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment