Delayed the script until the page is loaded.