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

Glib GIOChannel -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -

python - Obscure curses error message when creating a sub window -