Disclaimer: I am using jQuery Mobile 1.1.0 RC1, which is not yet stable. I have a link that should send an AJAX request and return a JSON response, but when I click the link, it seems that jQuery Mobile changes HREF to hash (#) in iOS Safari on iPhone. This is not done when testing in browsers with iPhone User Agents. Here is my basic HTML and JS to show what I have:
<a href="/link/to/ajaxpost/">Send Ajax Request</a>
and js
$('#tab a').on('click', function(e){
var $this = $(this);
var jsonUrl = $this.attr("href");
alert(jsonUrl);
$.mobile.showPageLoadingMsg();
$.ajax({
type: "POST",
url: jsonUrl,
success: function(data) {
$.mobile.hidePageLoadingMsg();
alert(data);
}
});
return false;
});
"jsonUrl" "#" ( url ajax), , JSON, . , iOS Safari iPhone. , JSON , jQuery Mobile OSX Safari Firefox.
rel= "external" data-type = "ajax" , . jQuery Mobile 1.1.0 RC1, , , jQuery Mobile . JQuery Mobile JS , , , -, . .