I am dynamically inserting the jQuery library on a page via <script>
tag:
jq = document.createElement('script');
jq.setAttribute('src','//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');
b.appendChild(jq);
Then I have some jQuery script that needs to run after the jQuery library has finished loading and is ready for use:
$(f).load(function() {
$(f).fadein(1000);
});
How can I make it wait for jQuery to load?