I am very new to this, I made this function:
Works well, but I want that instead of modifying the value of #userid I return a value, I tried this:Code:function getID(user){ $.getJSON('https://twitter.com/users/'+user+'.json?callback=?', function(data) { $('#userid').html(data.id_str); }); }
But it makes me return to the function within which it is, not getID.Code:function getID(user){ $.getJSON('https://twitter.com/users/'+user+'.json?callback=?', function(data) { return data.id_str; }); }
Solutions?
Thanks!



Reply With Quote

