I have a code like this:
document.body.innerHTML=data();
I would like to do something (url/split) after this code has finished:
$(data).find('a').prop('href', function(_, href){
url = href.split('/');
return href.replace(url[2], 'someUrl');
});
How do I chain the two codes together? I tried:
document.body.innerHTML=data().end().find('a').prop('href', function(_, href){
url = href.split('/');
return href.replace(url[2], 'someUrl');
})
doesn't work, tried some other variations with no luck.
datais and provide any other related functions (in casedatais a function)