Reputation: 1064
I'm currently working on a jQuery Mobile enabled website. On this website I have some kind of inbox page, where you can press a button that will redirect you to the message you clicked. But I cannot get the hyperlink to work without data-ajax="false"
, which means, I cannot use any of the nice animations jQuery Mobile offer. :-(
If I don't use the data-ajax="false"
attribute the page loads a white page, so I would like to know why it is necessary to use the data-ajax attribute? And how I can change the link so that it will work without the data-ajax attribute, so I can use the animations again.
this is my link:
<a href="/members/stuurbericht/513661?prid=3575" data-ajax="false">
<img src="btn_stuurbericht.png" class="fifthimage">
</a>
============= EDIT ===============
Guess this question got lost in the history of stackoverflow, so I hope editting it will upvote it or something...
I still cannot use any links without the data-ajax="false"
, and it turns out to be a problem with every page on my website. When I click a link:
<a href="/zoeken?prid=3575" data-transition="slide"></a>
JQM adds a div
at the bottem of the page, within the body
tag. The html of this div
is:
<div data-role="page" data-url="/zoeken?prid=3575" data-external-page="true"
tabindex="0" class="ui-page ui-body-c ui-page-active" style="min-height: 494px;">
</div>
I would expect that this div should contain the HTML code of the page, but it doesn't, as you can see the content is empty (like the page that is showing). Also there are no jquery errors, and unfortunently my jquery knownledge is too little to see what goes wrong inside the jquery mobile function that loads the HTML of the page ($.mobile.changePage).
I'm sorry but I cannot add any source code of the actual website because I like to remain anonymous about my work. But I can assure there are no errors on the page (jquery / html) and the page consist of a nice <html><head></head><body><div data-role="page"></div></body></html>
structure.
Upvotes: 2
Views: 3505
Reputation: 1064
I forgot the website was dealing differently with AJAX calls, that was the reason...
Stupid me...
Upvotes: 1