Created
March 1, 2009 21:31
-
-
Save sintaxi/72476 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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