Questions about jQuery's getScript()

Posted by Nimbuz on Stack Overflow See other posts from Stack Overflow or by Nimbuz
Published on 2010-04-26T06:20:14Z Indexed on 2010/04/26 6:23 UTC
Read the original article Hit count: 168

$.getScript("somescript.js", function() {
    alert('Load Complete');
});
  1. Once loaded, is it cached or is it loaded again if referenced more than once?
  2. If an event depends on this file being loaded, will the event be delayed of fail/timeout in case the file takes longer to load or doesn't load?
  3. How do I check and do something in case the file fails to load for some reason?

Thanks in advance for your help.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery