Proper way to ajaxify links? According to a comment on Drupal's AJAX framework it should be possible to define a link as a render array which Drupal then would turn into an ajaxified link. As far as I understand it, the essential part of this is :

$link = array(
  '#type' =&gt; 'link',
  '#title' =&gt; t('something'),
  '#href' =&gt; 'some/path',
  '#ajax' =&gt; array(
    'callback' =&gt; 'some_callback_function',
    'wrapper' =&gt; 'ajax-response-goes-here',
    'method' =&gt; 'replace',
    'effect' =&gt; 'fade',
  ),


However, I'm not quite certain which url the client would use to actually invoke the AJAX request? I know forms use 'system/ajax' to access callback methods from there, but what about this case?

If anyone would have the chance to shed a little light on how to properly ajaxify links, I'd be very greatful!
I would be rather suspicious about the '#ajax' way. Try to have a look here : http://api.drupal.org/api/examples/ajax_example%21ajax_example_misc.inc/function/ajax_example_render_link/7

What they say :


include the ajax.js
add use-ajax class
implement ajax callback under the link your link directs to


what should be done after the callback executes can be set by the ajax commands.