Thanks to all who was trying to help me with WP8 and AJAX.
Problem in a few words, here is my code in WP8+Phonegap:
document.addEventListener('deviceready', function () {
jQuery.support.cors = true;
$.mobile.allowCrossDomainPages = true;
$.Mustache.load("www/about.txt");
}, false);
In jquery.mustache.js .load():
function load(url, onComplete) {
return $.ajax({
url: url,
dataType: options.externalTemplateDataType
}).done(function (templates) {
$(templates).filter('script').each(function (i, el) {
add(el.id, $(el).html());
});
if ($.isFunction(onComplete)) {
onComplete();
}
});
}
When gets callback it goes to function Add.
It all works on iOS, Android and WP8.
But on WP7.5 it doesn't work. How to fix it?