Retrieve tweets from local .json file with jQuery -


i've saved set of twitter user timelines local .json files later use. i'm trying load json using $.getjson it's not working expected.

$.getjson('http://localhost:8888/path/to/js/tweets.json', function(data) {     console.log(data); }); 

nothing logged in console.

i've tried using $.ajax synchronously, e.g.

$.ajax({     url: 'http://localhost:8888/path/to/js/tweets.json',     datatype: 'json',     async: false,     success: function(json) {         console.log('success');         console.log(json);     } }); 

but nothing's happening there either.

for info i'm aiming put json files on same server script, , in same folder script (in wordpress theme).


Comments