Is there an event that I can register that will be executed after all $(document).ready scripts are executed? I’ve got a piece of code that needs to be executed after the whole page is fully loaded (also the jQuery scripts). Is this possible?
I need to register this in a script file, so can’t put the function at the bottom of the page.
It is not possible to attach an event to when all of the scripts are executed and run. There is no hook for for your particular case in javascript because scripts can have very different logic like being loaded asynchronously, having timeouts, etc. But there is an event that is fired when all of the scripts are loaded in the browser (but still they are not executed):
will be executed after the whole page including scripts and graphics will be loaded. Though, this doesn’t mean the scripts are actually executed.
But, if your scripts only contain the logic that requires immediate actions like
then those will be executed before
$(window).load()