I've added the async
attrib to my javascript inclusion HTML.
So now I've:
<script async src="jquery.myscript.js"></script>
And this works with all JS I load, all except jquery.
If I add async
to jQuery <script>
tag all others script who depend from jquery don't work.
In that jsfiddle you can see the problem:
JsFiddle
In the example I've used <script> Mycode </script>
instead of including an external file.js, but this doesn't change the situation.
I'd like to run jQuery with async attrib and run other few external scripts asynchronously only after jquery is loaded.
It is possible?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…