Closed henryruhs closed 10 years ago
You haven't been terribly clear about what didn't work and this isn't really the place to ask how to write JavaScript... but...
If you're not on the dfm.io domain (hope you're not), you have to use JSONP:
<script>
function dudeface(data) {
console.log(data);
}
</script>
<script src="http://osrc.dfm.io/dfm.json?callback=dudeface"></script>
Thanks DFM, thats the jQuery snip working well... maby you should put this online somewhere?
$.ajax({ url: 'http://osrc.dfm.io/dfm.json', dataType: 'jsonp', jsonpCallback: 'dudeface' }); function dudeface (data) { console.log(data); };
Hello,
can you give an example how to fetch the JSON data using jQuery's Ajax or native Ajax? I tried JSON and JSONP, didn't work at all.
I'd like to add some of your stats to my website.
Thanks!