how to call a JQuery function inside an ajax callback function I have a custom module, this module has a form with an ajax submit callback

$form['submit'] = array(
'#type' =&gt; 'submit',
'#ajax' =&gt; array(
    'callback' =&gt; 'mymodule_submit_driven_callback',
    'wrapper' =&gt; 'box',
),
'#value' =&gt; t('Submit'),
);


I into the callback function I need to call a JQuery function:

function mymodule_submit_driven_callback($form, $form_state) {
//call JQuery function here
}


How can I do this? Thanks.
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);