Here goes my function that receives some data and has to return it or pass it down to other function, how can return data from the inner based functions? Easy question but I just never used something like this
getData: function(callback){
$.ajax({
url: myUrl
}).done(function(data){
$(document).ready(function(){
(callback) ? callback(data) : return data
});
});
}