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 ?


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 ? – Lachezar Raychev Feb 23 '16 at 14:13
  • setTimeout doesn't jQuery Function, so you cannot use it as $.setTImeout , also It is spelled not properly – KAndy Feb 23 '16 at 14:40
  • if are you talking about the capital I, that is not in the code.. nvm – Lachezar Raychev Feb 23 '16 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.