jQuery::Ajax success never occurs
- by Legend
I have an ajax call in the head section of my index.html
$.ajax({
method: 'get',
url : 'php/getRecord.php?color=red',
dataType: "json",
success: function (data) {
alert(data);
}
});
For some reason, that alert never gets called. Am I doing something wrong? The PHP file does give me data when testing it directly.