there is no ajax example in jqueryui tooltip's demo,so it took me a little time to figure it out, hope it helps you. it is quite simple for those who fully understand the callback mechanism of js, I guess.
  items:'#lists .table a.btn-preview',
  position: { my: "left+15 top", at: "right center" },
  content:function(callback) { //callback
    $.get('preview.php',{}, function(data) {
      callback(data); //call the callback function to return the value