I\'m loading an external script through .load(\'url\') and need to wait for it to finish so I can update the source of an image. Sometimes load is fast enough
.load(\'url\')
Your question is answered here on how to capture the success event of a load function: Checking Jquery ajax load success