0

I'm having to work on some old code at work and have a standard document.ready like with some third-party code:

<script src='http://thirdparty.com/some.js'></script>

$( document ).ready(function() {
    console.log( "ready!" );
});

I know that jQuery says document.ready fires after the DOM is ready but would it have to wait for ALL 3rd party code to load? I'm pretty sure this doesn't include Promises / Network code though, right?

timpone
  • 19,235
  • 36
  • 121
  • 211
  • I believe the duplicate answers your question. If it doesn't, please update the question to include a specific use case. – Rory McCrossan Mar 11 '21 at 15:34
  • @R I think it's unclear which is what my question was asking. If I call a third party script, must it load before document.ready calls? That's how I've understood it but not 100% sure. Honestly, I'm not a front-end dev so just trying to get explicit clarity. – timpone Mar 11 '21 at 15:37
  • `If I call a third party script, must it load before document.ready calls?` yes. – Rory McCrossan Mar 11 '21 at 15:38

0 Answers0