hi i've a little problem when i load json file from my server, the code that i use is:
function dataLoad(){
//console.log('loading json...');
var pathUrl = "public_html/wp-content/themes/turisti/include/main.json";
var places = [];
$.ajax({
url: pathUrl,
dataType: 'jsonp',
timeout: 5000,
success: function(data, status) {
console.log("success");
},
error: function() {
console.log("some errors");
}
});
}
i call this function on the ready event for the DOM, unfortunately i can load the file, the path is correct i verify that via ssh terminal, but the function call ever the error callbacks, someone have some idea to solve this problem?