How to change ID after $.get()

How to change ID after $.get()

How can I set the ID of a div after doing a $.get().
The point is to make it so that each piece that gets added using this function will have a uniqueID.
Everything I try seems to fail, I'm guessing its because the fragment of html that I am appending isn't in the document when i go to search for it. 

I'm new to jQuery but I'm sure this isn't as hard as it seems.
  1. var uniqueCounter = 0;
  2. Add('Container.aspx', '#content'); //The default id of div from conatiner.aspx fragment is 'Container.aspx' for ease

  3.       function Add(frag, location) {
  4.             $.get(frag, function(data){$(location).append(data); }) //This part works
  5.               .complete(function() {$('#' + frag).attr('id', frag + uniqueCounter);});
  6.             uniqueCounter++;
  7. }
Or if there are better ways to do this I would love to know :)  thanks