1

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

Brian L
  • 13
  • 3

1 Answers1

5

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>
Steve Greatrex
  • 15,789
  • 5
  • 59
  • 73
  • Worked for my situation too! In case anyone else runs into this, I was trying to handle a LogOff action from and MVC3 app where I was also jquery mobile. I wanted the app to Redirect to the Log ON screen whenever they Logged off. The Jquery Mobile ajax was preventing this from happening until I added the rel="external" attribute. Here's the format for adding a Log Off button in my MVC 3 _LogOnPartial.cshtml layout file: – prilldev Oct 04 '11 at 20:27
  • ...a Log Off link next to the logged-in User's name in my MVC 3 _LogOnPartial.cshtml layout file with the JQuery Mobile data_role="button" and rel="external" attributes: UserId @User.Identity.Name [ @Html.ActionLink("Log Off", "LogOff", "Account", null, new { data_role="button" , rel="external" }) ] – prilldev Oct 04 '11 at 20:33