jQuery event ajax dispatching
<p>In jQuery is there clever/shorthand way of tacking on an identifier to some general ajax events?</p>

<p>To explain, i am creating some functionality that is split between two seperate pieces of functionality: module A and module B.  Module A, along with some other things, is primarily responsible for an ajax call. Module B is responsible for frontend dom work, after module a has finished and the ajax call has been returned.</p>

<p>I am currently simply triggering events for each of the ajax functions:</p>

<ul>
<li>beforeSend</li>
<li>success</li>
<li>complete</li>
<li>error</li>
</ul>

<p>So module has this code (among other stuff):</p>

<pre><code> $.ajax({
    url: 'myajaxurl',
    beforeSend : function() {
        $('#form').trigger('module_a_before_send');
    },
    success: function(response) {
       $('#form').trigger('module_a_success');
    },
    complete: function() {
        $('#form').trigger('module_a_complete');
    },
    error: function(textStatus) {
        $('#form').trigger('module_a_error');
    },
    timeout: 3000
});
</code></pre>
