Load jquery asynchronously before other scripts

后端 未结 5 1575
情书的邮戳
情书的邮戳 2020-12-05 06:33

I\'ve added the async attrib to my javascript inclusion HTML.
So now I\'ve:

         


        
5条回答
  •  无人及你
    2020-12-05 07:16

    I'd like to run jQuery with async attrib and run other few external scripts asynchronously only after jquery is loaded.

    What does that mean? It sounds a lot like you want to load jQuery first, then other things when it's done. So you want to load it synchronously. If you still want to use the async way, you could define an onload function to continue loading other things once jQuery is ready. Or you could use defer. Both of these are explained here: https://davidwalsh.name/html5-async

提交回复
热议问题