Ajax Framework Using Dynamically Generated Links I know, for links to be ajaxified they need to have a class: "use-ajax" and a proper url which has its own callback. For example:

&lt;a href="ajax-reader/nojs/1/2015-03-05" class="use-ajax ajax-processed"&gt;Ajax Link&lt;/a&gt;


If the link was statically created on the server, it works perfectly fine. But whenever I add a new link with the same properties, ajax seems not to work anymore. For instance, if I remove existing link and add a new one with new url parameters:

var ajaxRightUrl = 'ajax-reader/nojs/1/' + lastNextDate;
arrowLinkLeft.find('a').remove();
arrowLinkLeft.append('&lt;a href="' + ajaxRightUrl + '"class="use-ajax"&gt;&lt;/a&gt;');


It stops being an ajax link. Any ideas why?
you are probably missing the part to add behaviors to your new elements:

Drupal.attachBehaviors('.use-ajax');