问题
I am using jQuery mobile and MVC 2.0 for my mobile site. I have a link on the mobile site to go to the main site. The problem is that when I land on the main site my styles still look like jQuery mobile styles. If I refresh the page then it correctly shows the main site's styles.
I am wondering how to force out the jQuery mobile styles and/or make sure that I get my main site styles when I land on the (login) page.
Details: Sites served under IIS 7.5. Main Site in Classic 2.0 (VB.NET) with "sub"-site in Integrated 2.0 (MVC, jQuery mobile beta 3). dev environ Windows 7 / VS 2010 / .NET 3.5. (to deploy on Server 2008)
Thanks for any insight.
-Brian
回答1:
It's possible that your link is still being navigated by the jQuery Mobile AJAX navigation system; you can get around this by putting a rel="external" attribute on the link:
<a href="www.fullsite.com" rel="external">Full Site</a>
来源:https://stackoverflow.com/questions/7504024/redirect-from-mobile-site-jquery-mobile-to-main-site-styles-linger