[javascript] How to make script execution wait until jquery is loaded