in the $.ajax function the url part has data.json which is a text file but i want to put a url i.e.
the code works with
$(document).ready(function() {
$('#content').html('');
$.ajax({
url:'data.json',
dataType: "json",
success: function(data) {
$('#content').append('<p>'+data.rank+'</p>');
}
});});
where data.json is a text file...but wen i replace 'data.json' with 'http://twittercounter.com/api/username=Anand_Dasgupta&output=json&results=3'...which is the actual url ,then there is no output...
$(document).ready(function() {
$('#content').html('');
$.ajax({
url:'http://twittercounter.com/api/username=Anand_Dasgupta&output=json&results=3',
dataType: "json",
success: function(data) {
$('#content').append('<p>'+data.rank+'</p>');
}
});});
an advice will be highly appreciated. Thank You.