jquery - Is it possible to wait until all javascript files are loaded before executing javascript code? -


we have several javascript files load @ bottom of master page. however, have situation need perform javascript before other scripts loaded. possible wait till javascript files loaded , execute javascript code?

i thought $(document).ready() did this, turns out, doesn't. of course can move script files bottom top, wondering if it's possible want.

you can use

$(window).on('load', function() {     // code here }); 

which wait until page loaded. $(document).ready() waits until dom loaded


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -