How to track full the download script to jQuery?


There is a script:

<script id="myscript" src=""></script>

Is initializing this script:


How to jQuery wait until it loads the main script and then start the initialization script?

While doing so:

jQuery( "#myscript" ).load( "", {limit: 25}, function() {

But, unfortunately, it then works, then fails... How can this be implemented?

UPD: anyway, here's the solution of this particular question:

/* Wait until fully loaded script
 * and only after it was fully downloaded, activate it */
$.getScript("", function() {

Concrete solution.
July 2nd 19 at 13:13
2 answers
July 2nd 19 at 13:15
the <script>
$(document).ready(function () {
It doesn't work for some unknown reason. If I put the delay in the execution of the script on a couple of seconds - is triggered. But this is not right? That's why I asked how to track the download script? - Johnathan.Nader44 commented on July 2nd 19 at 13:18
: Debug in your hands! - Alison.Bail commented on July 2nd 19 at 13:21
July 2nd 19 at 13:17
or a shorter version


Find more questions by tags jQuery