$.append not working?

$.append not working?

I'm not sure why I'm having this problem. I have a div, and when you click a link it loads new content into it. So..
1) you click the link
2) I'm using $.getScript to load any extra js for that page
3) once that's loaded it loads the page into the div
4) in the js file that was just added I have "$(document).ready(function(){" so when the page has loaded it will $.append a few things inside the div

What's weird is it only seems to work half of the time. I've also put something simple like alert('') inside the document.ready section and that will always pop up. So I'm thinking the problem must be with $.append... Do any of you have any ideas why I'm having this problem?