Quote:
Originally Posted by FlexxAeon
look up the "meta viewport tag" in google. i didn't look too closely at your site but i suspect that's your issue, as i saw it was missing. one line of code.
|
Thanks, I'm using the same template for both versions with 2 different style sheets and the following mobile.js script:
PHP Code:
function pageWidth() {
return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;
}
function doMobile(){
if(pageWidth() < 600){
mobile = true;
} else if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
mobile = true;
} else if((navigator.userAgent.match(/android/i))) {
mobile = true;
} else {
mobile = false;
}
if(mobile == true){
document.write('<link rel="stylesheet" type="text/css" href="http://youngblackgirlfriends.com/m-style.css" />');
} else {
document.write('<link rel="stylesheet" type="text/css" href="http://youngblackgirlfriends.com/style.css" />');
}
}
How can I insert the "meta viewport tag" using this script???