View full site link from Jquery mobile page (prevent links from going back to mobile)

View full site link from Jquery mobile page (prevent links from going back to mobile)

Hi,

I've got a jquery mobile site and I've put some code in the header of my "full" site to redirect to the mobile site based on the user's screen width.

I've got a "full site" link on the jquery mobile site's home page however...

Clicking the full site link DOES take me to the full site, but if I click on any links on the full site page, it redirects me back to the mobile site. I'm new at this. Can anyone help? This is the header redirect code:

---------------------
function urlParam(name){
            var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
            if(results)
                return results[1] || 0;
            else
                return '';
        }

        if(urlParam('view') != 'full'){
            // <![CDATA[
            var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())); 
            if (mobile) {
                    document.location = "http://mysite.com/mobile/index.html"; 
            } 
            // ]]>
        }
------------------------
And here's the full site link code:

-----------
<li><a href="http://mysite.com/?view=full" rel="external" data-transition="flip">Full Site</a></li>





























    • Topic Participants

    • mike