Given a JSON file at http://codio.io/hugolpz/Cat-is-smart/data/dict.json.
Given I want to load it, then to display it (get my hand on it and use it).
I thus use:
$.getJSON( "http://codio.io/hugolpz/Cat-is-smart/data/dict.json", function( json ) {
console.log("This step is fired."); // OR NOT !
alert( "JSON Data: " + JSON.stringify(json) );
});
or
$.ajax({
url: "http://codio.io/hugolpz/Cat-is-smart/data/dict.json",
dataType: 'json',
success: function(json2) {
alert( "JSON Data: " + JSON.stringify(json2) );
}
});
None work, even when tested on same domain.
What do I wrong ? How to fix it.