loading javascript file after jquery.ready

Posted by Spines on Stack Overflow See other posts from Stack Overflow or by Spines
Published on 2010-05-13T19:02:20Z Indexed on 2010/05/14 1:24 UTC
Read the original article Hit count: 259

Filed under:
|

I want to load a javascript file at the end of jquery.ready so that the code in my ready handler doesn't have to wait to execute until this large javascript file is loaded.

My jquery.ready code doesn't rely on this javascript file at all.

Would this be a good way to do that?

$(function(){
    ...
    ...      
    $('head').append('<script type="text/javascript" src="/largejs.js"></script>');
});

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery