Reputation: 569
I'm using Jquery Mobile Navigation Bars to do my navigation from page to page (or from tonight to detail in this case).
My base URL is: http://192.168.1.104/mobile/tonight.html
I'm trying to navigate from my base URL using the following code:
<a href='detail.html?id=slide&place=" + data.Places[i].id + "' data-transition='slide' class='ui-link-inherit'>" + data.Places[i].name + "</a>
But is taking me to http://192.168.1.104/mobile/tonight.html#detail.html?id=slide&place=3
When what I really want is: http://192.168.1.104/mobile/detail.html?id=slide&place=3
However, when I try linking directly to the full URL in the code, like:
<a href='http://192.168.1.104/mobile/detail.html?id=slide&place=" + data.Places[i].id + "' data-transition='slide' class='ui-link-inherit'>" + data.Places[i].name + "</a>
It directs me to: http://192.168.1.104/mobile/tonight.html#http://192.168.1.104/mobile/detail.html?id=slide&place=3
How do I get around this? Do I need to make the href tag call a javascript function that would handle the url? Thanks in advance.
Upvotes: 2
Views: 7500
Reputation: 16915
jquery mobile loads your links with ajax and appends to an existing page. It's all in the documentation. http://jquerymobile.com/demos/1.0a2/#docs/pages/link-formats.html
If you want the link to be loaded traditionally add rel="external"
to your a tag.
Also:
Read some jquery mobile documentation or look at examples, because you should want it to work the way it works now and make your app work with it.
Use double quotes in your html like href="detail.html"
Upvotes: 4