I created leaflet map, when you hover the marker in popup window is a reference to the content.
I wrote module that loads ajax content in the custom region. For dynamic links added class use-ajax, but Drupal does not process them as I needed. I check and found that static links with class use-ajax have additional class ajax-processing. My dynamic link looks like:
<a id="jslink" class="use-ajax" href="nojs/problem/83">засорение реки</a>
Static link looks like:
<a class="use-ajax ajax-processed" href="nojs/node/231">node</a>
As I understand Ajax Drupal does not work with dynamic links. I found issue in what asks in what need to change the href attribute of a link and make the ajax call to the new url. Change 'href' attribute in AJAX enabled links Wrote JS code but it doesn't work for me.
(function ($) {
Drupal.behaviors.test_module = {
attach: function (context, settings) {
$("#jslink").click(function(){
var href = $("#jslink").attr("href");
Drupal.ajax['jslink'].options.url = href;
});
}
};
})(jQuery);
Is it possible to somehow make Drupal to work with dynamic links? What am I doing wrong?