I have a js file which I want to load after Jquery deffered function. Thing is that I am bring data in my getData function and then inject string into the DOM. After that js file will initialize that code. That is the reason I want to call js file after my code runs
How can I do that
Below is my code.
jQuery function decalaration
function getData(url) {
return $.ajax({
url: url,
method: 'GET',
headers: {
Accept: 'application/json; odata=verbose',
},
})
}
function call
getData(url).then(function(data){
});
Now I want to call jQuery file after finish of then function.
<script src="file.js"></script>