I just started playing with jQuery Mobile Alpha 2 and a crazy little bug associated with links got my head spinning the other day. If you read through the API Documentation you will see that a normal link, such as <a href=”blog.html”>blog</a>, will be hijaxed if the browser supports it. However, when I click on the link and view a page within the same directory as the referring page, the linked page displays with no style. It looks like a plain HTML page with no CSS as opposed to a cool looking jQuery Mobile Page.
Turns out this is a bug with the latest release and there are a few ways to fix it. My solution was to just append a “?” at the end of the url of the link. I did it with a bit of unobtrusive jQuery, but just appending the “?” to the url manually will work as well.
Appending the “?” will cause the blog.html page to be rendered correctly within the browser. If you are just starting out with jQuery Mobile Alpha 2 and come across this bug, I hope this quick post helps you out.