View Single Post
Old 03-23-2011, 07:59 PM  
mchacal
Confirmed User
 
mchacal's Avatar
 
Industry Role:
Join Date: Aug 2007
Location: Canada
Posts: 1,069
Quote:
Originally Posted by FlexxAeon View Post
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 != nullwindow.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???
__________________
Tech & Gadgets at Great Prices - antonio(at)techtonystore.com | ICQ: 219116429 | Skype: tonio514
mchacal is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote