I'm new to using JQuery, and I'm having a problem with this line of code.
function getById(id, callback)
{
return $.get(url, {}, callback);
}
When i look at what .get returns it's not an xml node or JSON which is what I thought it was supposed to return. Instead I get an Object with a collection of Methods and Prototype. Also it has a ready state. So its not returning undefined but its also not returning what I'd expect. what could the problem be?
I've tried assigning the get to a variable but that didn't do anything I also tried using a callback function but I don't really understand how I can use that to assign the data returned from get to a variable.