I have to make the WordPress post pages to load through AJAX because I think that is a hassle on the user experience and one more things is I don't want to display: https://mydomain/dashboard/page/2 on the URL. Here is the things:
Everything seems to load perfectly through AJAX with the use of this code:
jQuery(document).ready(function($) {
$("body").on('click', '.job-page a', function(e){
e.preventDefault();
var link = $(this).attr('href');
$('#my-jobs-content').fadeOut(0, function(){
$("#hb_job_list").load(link + ' #hb_job_list', function() {
$("#my-jobs-loader").hide();
$(this).fadeIn(500);
});
});
$("#my-jobs-loader").show();
});
});
However, there is a button on the page that is loaded that have a script and I'm not able to make it work. I tried to make the .on to .live but it returns 404 ajax error. Any tips?