So I have links that are created when a page first loads that use a render array that is something like this:
array( '#type' => 'link', '#title' => html_entity_decode(t($title)), '#href' => $href, '#post_render' => array('_dva_post_render_ajax_link'), '#attributes' => array( 'class' => array('ajax-link'), 'rel' => url($href), ), '#ajax' => array( 'path' => 'dva/ajax/'. $href, 'wrapper' => 'content', 'effect' => 'fade', 'prevent' => 'mousedown', 'progress' => array( 'type' => 'none', 'message' => '', ), ) );
These all work as expected and properly run the ajax and change the page content, etc.
However, when the page content also includes one of these links, the links included in the ajax response are just normal links and have no ajax functionality. The links are created using this same render array and they render correctly (that is, their markup appears the same as the links that work)
How can I tell Drupal to attach the ajax event handlers to the new links that have just been added to the DOM?