treehouse : what would you like to learn today?
Web Design Web Development iOS Development

DocRocks

  • Detect mobile and redirect

    Outstanding! That Worked! Again, thanks for all your effort to help me resolve this.
    Comment by DocRocks October 2011 permalink
  • Detect mobile and redirect

    I get a text window that says - this should redirect to .... Doesn't redirect to my mobile site. It does redirect from my desktop IE8. What is so different about Android I wonder? BTW if you want to look at the code in the test page, the file o…
    Comment by DocRocks October 2011 permalink
  • Detect mobile and redirect

    Hey Johnnyb. Thanks very much for hanging there with me. After adding the code to the indexTest.htm file it works in my desktop but doesn't work on my Android. I tried it first at the top of the head area, just before and after the script - …
    Comment by DocRocks October 2011 permalink
  • Detect mobile and redirect

    Yes. Here is the code - do I have the right syntax? $(document).ready(function(){ if($(window).width() < 480){ window.location.href = "http://alsautomotiveandtruck.com/mobile/index.htm&quot; } });
    Comment by DocRocks October 2011 permalink
  • Detect mobile and redirect

    Right - when I decrease my IE8 desktop browser to this - if($(window).width() < 480) - then redirects to the mobile page. However, this does not work on my Android smartphone - I still get the desktop version. I haven't made any changes t…
    Comment by DocRocks October 2011 permalink
  • Detect mobile and redirect

    Site back online.
    Comment by DocRocks October 2011 permalink
  • Detect mobile and redirect

    Sorry, having trouble with opening the site and am working with the host to resolve. Try the link to it later if necessary to help me resolve my mobile problem.
    Comment by DocRocks October 2011 permalink
  • Detect mobile and redirect

    Thanks folks. I am trying Dave's js and my Android mobile is reporting download unsuccessful for this site. The index.htm in the site root folder has Dave's code in the head area and I have pointed window.location to the index.htm file in …
    Comment by DocRocks October 2011 permalink
  • Detect mobile and redirect

    Thanks Christopher and Johnnyb - the simple jQuery looks like what I am after to detect small screens. I enclosed the if statement with
    Comment by DocRocks October 2011 permalink