WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Mobile Re-direct Script (2 posts)

  1. wellsey9
    Member
    Posted 1 year ago #

    Hi everyone,

    I recently received a mobile re-direct script and was given instructions for installing it in our website. However, I can't get it to stick. It seems that the header will not allow editing, but I have checked the permissions on godaddy and the admin appears to allow read/write access in the header/contents folder on the FTP. Any ideas?

    Here are the instructions...

    1. Place all this before the </head> tag:

    <script type="text/javascript">
    <!--
    if (screen.width <= 599) {
    document.write('<div class="alert"><p align="center">Click here for our Mobile site</p></div>');
    }

    else if (screen.width == 800 && screen.height <= 480) {
    document.write('<div class="alert"><p align="center">Click here for our Mobile site</p></div>');
    }

    else if (screen.width == 960 && screen.height <= 640) {
    document.write('<div class="alert"><p align="center">Click here for our Mobile site</p></div>');
    }
    //-->
    </script>
    <style type="text/css">
    .alert {
    background:#FCE9C0;
    border-top:2px solid #DBAC48;
    border-bottom:2px solid #DBAC48;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11pt;
    color: #2F393D;
    padding: 6px 5px 6px 5px;
    }
    </style>

    2. Place this directly under the <body> tag:

    <noscript>
    <div class="alert"><p align="center">Click here for our Mobile site</p></div>
    </noscript>

  2. wellsey9
    Member
    Posted 1 year ago #

    Scratch that everyone - it works now.

Topic Closed

This topic has been closed to new replies.

About this Topic