Load Load JavaScript with extra tags for example data-shr-siteid or data-sumo-site-id
You can use below code.
<script> var loadScript = function(location, callback){ var fileRef = document.createElement('script'); fileRef.setAttribute('type','text/javascript'); if (callback) { ...
Friday, April 07, 2017
load javascript with callback script
How to load JavaScript with callback script
Sometime you needed to write a javascript that load and after load immediately call other it's related javascript code. It is called load javascript with callback script.
How to achieve it?
It is simple. below is the few lines of code.
<script type="text/javascript">function loadmyScript(url,...