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 ?
1 Answer
In general, no, because the scripts are loaded asynchronously.
-
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 ? Commented Feb 23, 2016 at 14:13
-
setTimeout doesn't jQuery Function, so you cannot use it as $.setTImeout , also It is spelled not properly– KAndyCommented Feb 23, 2016 at 14:40
-
if are you talking about the capital I, that is not in the code.. nvm Commented Feb 23, 2016 at 14:45