how to call a JQuery function inside an ajax callback function
As Jose Daniel said: use ajax_command_invoke() in your ajax callback:

$commands[] = ajax_command_invoke(NULL, "your_function");
$output = array('#type' =&gt; 'ajax', '#commands' =&gt; $commands);
ajax_deliver($output);


Your JS-File:

(function ($) {
  $(document).ready(function(){
    $.fn.your_function = function() {
      // do cool stuff
    }
  });
})(jQuery);