"Simplest" navigation in jQuery Mobile
Here's my code:
<ul data-role="listview" data-inset="true">
<li data-role="list-divider">foo</li>
<li><a href="shoppingCart.htm?step=1&idOcc=123">p1</a></li>
开发者_开发技巧 <li><a href="shoppingCart.htm?step=2&idOcc=346">2</a></li>
</ul>
I simply want to load the other page, as this one (the first viewed).
Why does it hang?
If you do not with to use AJAX to load the other page, add this to your anchor tag:
data-ajax="false"
E.g.
<a href="shoppingCart.htm?step=1&idOcc=123" data-ajax="false">p1</a>
There could be a number of reasons why the page hangs when you go to it, but trying to view it outside of an AJAX load is a good start. Also, make sure you are using the HTML5 doctype, as jQuery Mobile requires it.
<!DOCTYPE html>
Two more things for other cases:
Be sure you use a recent version of jQuery Mobile. Versions alpha1 and alpha2 had general problems with loading content, versions alpha2 and alpha3 had problems loading local files when not on a server.
before data-ajax
was introduced, a rel="external"
was used and it is still valid and I'd recommend it.
精彩评论