1

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

1 Answer 1

2

In general, no, because the scripts are loaded asynchronously.

answered Feb 23, 2016 at 13:42
3
  • 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 Commented 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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.