Call function after ajax success function complete: Solved!

Call function after ajax success function complete: Solved!

This problem is now solved and I no longer need help.

I have this code and am experiencing some problems

$.ajax({
      url: this.html_url,
      cache: false,
      success: function(html){
            $('body:last-child').append(html);
            return true;
      }
   });
doSomething();


My problem is that doSomething is called before the ajax success function has completed. I would like doSomething to be called immediately after the ajax call is completed including the success function. Any help?