AJAXifying content and pagination problems I am using the Ajax links API module that allows to load a node inside a &lt;div&gt; tag by using &lt;a class="ajax-link" href="node/add/page" rel="#content"&gt;Add page&lt;/a&gt;.

However, I have a problem: If I use a pager, and I click on the link to see another page, I will be redirected to that page, instead of loading it inside the &lt;div&gt; tag.

I solved partially by using the Views Infinite Scroll module, but if I have several &lt;div&gt; tags, the module doesn't load the correct view in the correct &lt;div&gt;.

It seems I cannot use the pagination because the URL is not re-written to accommodate to the container, and it is not scrolling because this limitation.

Is there some way of creating simple AJAX calls loading content in different &lt;div&gt; tags on the same page, and with pagination (or load more button, infinite scrolling, etc.)?
Try this below solution with views pager ajax enable. 

jQuery 1.7+ Version

function runthiscode() {
  $(".pager a").each(function(){
    $(".pager a").addClass("ajax-link");
    $(".pager a").attr('rel', '#content')
  });
}

$(document ).ready(function() {
  runthiscode();
});

$(document ).ajaxComplete(function() {
  runthiscode();
});