jQuery custom events not working
<p>I wanted to have to JS files communicate to each other via jQuery events and thought it would be pretty straight forward but have run into a problem that I think I need help with. </p>

<p>Basically I'm using a DOM element with an ID of '#nav-controller' to act as the messenger between the two JS files. The first file -- and I have checked that it <em>is</em> the first one to execute -- listens for two custom events:</p>

<pre><code>function external_command_listener () {
    // Click Handling
    $( '#nav-controller' ).on( 'clickhandler' , function ( e , param ) {
        alert ("registering clicks to: " + param );
        register_qs_click_handler ( param );
    });
    // Menu Control handling
    $( '#nav-controller' ).on( 'controlframework' , function ( e , param ) {
        alert ('registering menu handling to: ' + param );
        register_qs_control_framework ( param );
    });
}
</code></pre>

<p>Now that that's setup. The second file uses trigger() to effectively call the function in first file. Here's the code:</p>

<pre><code>function Initialise_Navigation () {
    navTemplate = Template_File_Name ( 'navigation' );
    $.get( navTemplate , function (data) {
        $( '#page-nav-system' ).html(data);
        $( '#nav-controller' ).trigger( 'clickhandler' , ['#application li'] ); // register a click handler
        $( '#nav-controller' ).trigger( 'controlframework' , ['.quicksand-cntrl'] ); // register a control framework
</code></pre>

<p>I have tested using Chrome's debugger that it does execute the Initialise_Navigation() function and in turn apparently runs both trigger statements but the listeners setup in the first file never activate. I tried it also with just a generic 'click' event but that too failed. </p>

<p>Any ideas? I'm at the end of my rope.</p>
