|
Post by Frank on Nov 9, 2014 21:53:25 GMT
I found the script here: www.soundfeelings.com/free/best-mobile-redirect-javascript/Used it here if you want to see it in action. Add this to the <head> via visual.html <script type="text/javascript"> if (screen.width < 574) { var ref = document.referrer; var urls = new Array("http://www.mymainsite.com","http://m.mymobilesite.com"); var n = ref.match(urls[0]); var m = ref.match(urls[1]); if ((m!==null) || (n!==null)) { stop; } else if (ref=='') { var r = confirm("Small Display is Detected.\nClick \"OK\" for MOBILE SITE."); if (r==true) { window.location = "http://m.mymobilesite.com"; } else { stop ; } } else { window.location = "http://m.mymobilesite.com"; } } </script> Check it out, Cheers, Frank
|
|