Reputation: 1475
I'm doing a simple test using the wakoopa (software tracking) api. Typing the following url in a browser relusts in unformated json
http://social.wakoopa.com/makingthings/software.json?
According to wakoopa "By default JSON-responses are wrapped in a callback function named wakoopaApi
" I'm trying to so a simple jquery test: with no reults
jQuery(document).ready(function($) {
$.get("http://social.wakoopa.com/makingthings/software.json?sort=active_seconds&period=month", function wakoopaApi(data){
alert("Data Loaded: " + data.software);
});
});
Any Ideas?
Upvotes: 2
Views: 299
Reputation: 76880
I think you should do
jQuery(document).ready(function($) {
$.getJSON("http://social.wakoopa.com/makingthings/software.json?sort=active_seconds&period=month&callback=?", function(data){
$.each(data, function(){
alert(this.software.name);
});
});
});
in this way you add a parameter that specifies the callback (callback=?
) and everything works
Look here http://jsfiddle.net/ZSzrm/
Upvotes: 2