Using jquery load some html, then affecting loaded content

Using jquery load some html, then affecting loaded content

I've managed to do two separate things:

Load a bit of html...

$('#button-div').click(function(){
   $('#frame-div').load('bitof.html');
});


Make a large div slide from left to right within smaller div...

$('.link1').click(function(){
   $('.frame-inner').animate({"left": "0px"});
});

$('.link2').click(function(){
   $('.frame-inner').animate({"left": "-640px"});
});


The problem I have is the sliding effect doesn't work when it has been loaded.

There must be an easy way to do this?