Is there any way to execute a custom javascript file after full content of the page is finished loading and after every other javascript file has finished execution ?
asked Feb 23, 2016 at 9:39
Lachezar Raychev
1,6127 gold badges26 silver badges45 bronze badges
1 Answer 1
In general, no, because the scripts are loaded asynchronously.
answered Feb 23, 2016 at 13:42
KAndy
21k3 gold badges51 silver badges59 bronze badges
-
ok, can you please tell me, why this require(["jquery","domReady!"], function($){ function removeUnused(elements) { $.setTimeout(function(){ $(elements).each(function(){ console.log(this); this.remove(); }) }, 5000); } $(removeUnused('.page-actions, .action-select-wrap')); }); fires $.setTImeout is not a function error ?Lachezar Raychev– Lachezar Raychev2016年02月23日 14:13:21 +00:00Commented Feb 23, 2016 at 14:13
-
setTimeout doesn't jQuery Function, so you cannot use it as $.setTImeout , also It is spelled not properlyKAndy– KAndy2016年02月23日 14:40:24 +00:00Commented Feb 23, 2016 at 14:40
-
if are you talking about the capital I, that is not in the code.. nvmLachezar Raychev– Lachezar Raychev2016年02月23日 14:45:09 +00:00Commented Feb 23, 2016 at 14:45
default