Wait for .load to finish and then do something
Your question is answered here on how to capture the success event of a load function: Checking Jquery ajax load success
load
method has callback function that is executed when the request completes. I think you should use it.
Add a callback function:
$('#yourElement').load('yourUrl.html', function() {
/* When load is done */
});
More to read at http://api.jquery.com/load