How to load external JS throug JS
2017-04-24 / Unknown
How to load/import external javascript/jquery through js file.
In the event that you need to incorporate a JS document in a JS you can utilize jQuery for that
$.getScript('another_file.js', function() {
//script is loaded and executed put your dependent JS here
});
Also, in the event that you can't utilize jQuery
var imported = document.createElement('script');
imported.src = '/path/to/imported/script';
document.head.appendChild(imported);
Are this article be help you ?. Please share this article.
How to load external JS throug JS
PermaLink: https://www.webmanajemen.com/2017/04/how-to-load-external-js-throug-js.html
Google Rich Snippets | Schema Markup Validator | Google Pagespeed Insight