I am making an website where the menu runs with AJAX for an smooth page transition but i am running into the problem of having to reload my page after my AJAX because on the loaded content the does not get effected by the Javascript files.
$.ajax({
history.pushState(url, null, url_i_am_requesting);
url: url_i_am_requesting,
success: function(html) {
var content = $('<div />').html(html).find('.page-wrapper');
$('.page-wrapper').html(content);
}
});
I have found that jQuery.getScript()
works fine, but when I have around 10 Javascript files, is there a way to execute them all again after the AJAX has finished without calling them one by one?