Team:StanfordBrownSpelman/jquery.mobilesite

From 2014.igem.org

(Difference between revisions)
 
Line 1: Line 1:
//Detects whether device being used to view site is mobile- if so, then redirect to mobile site
//Detects whether device being used to view site is mobile- if so, then redirect to mobile site
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
-
     window.location = 'https://2014.igem.org/Team:StanfordBrownSpelman/MobileSite'
+
     window.location = 'https://2014.igem.org/Team:StanfordBrownSpelman/MobileSite '
}
}

Latest revision as of 20:48, 12 August 2014

//Detects whether device being used to view site is mobile- if so, then redirect to mobile site if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {

   window.location = 'https://2014.igem.org/Team:StanfordBrownSpelman/MobileSite '

}