$(document).ready(function() {
$.getScript("http://jact.atdmt.com/jaction/JavaScriptTest");
});
jQuery in 2020try this
JavaScript:$(document).ready(function() { $.getScript("http://jact.atdmt.com/jaction/JavaScriptTest"); });
source: https://stackoverflow.com/questions/19737031/loading-scripts-after-page-load
Even if do if at least use window on load, ready function is depreciated.jQuery in 2020
![]()
(function(document) {
var newScriptTag = document.createElement('script'); // creates the script tag
var firstScriptTag = document.getElementsByTagName('script')[0]; // find the first script tag in the document
newScriptTag.src = 'myscript.js'; // set the source of the script to your script
firstScriptTag.parentNode.insertBefore(newScriptTag, firstScriptTag); // appends the new script to the DOM
}(document));
Defer is good here. https://javascript.info/script-async-deferSomething you can also try is adding async to your script tag, eg:
Code:script src="myscript.js" async
Hi thanks buddy,try this
JavaScript:$(document).ready(function() { $.getScript("http://jact.atdmt.com/jaction/JavaScriptTest"); });
source: https://stackoverflow.com/questions/19737031/loading-scripts-after-page-load