Hi,
I’m using jQuery’s .call() method to insert some html into my document. I am using the callback ‘textStatus’ to resize the container the html has just been inserted into. This all works great but the resize() doesn’t wait until all the http requests have completed for the newly inserted html. As i have a few images and embedded Vimeo iFrame, it does the resize too soon and and cuts off the bottom of my html. Does anyone know how i can postpone the .resize() function call until the images and video have been loaded into the document?
Thanks!
$(target).load("get-wp-content/test-param" #wordpressContent", function (responseText, textStatus, XMLHttpRequest) {
if (textStatus == "success") {
$('.container').resize();
}
});