jquery - Custom event doesn't trigger
<p>In the first script tag I have</p>

<pre><code>var foo = function(){
    $.ajax({
        url: foo.com,
        dataType:'json',
        success: function(data,status,jqXHR){
            $("#bar").trigger("custom");
        },
    });

}
var intervalID = setInterval( foo , 15000 ); 
</code></pre>

<p>In second  I have <strong>foo1</strong> function</p>

<p>And at the body's bottom I have</p>

<pre><code>jQuery(function($) {
    $("#bar").on("custom",foo1);
});
</code></pre>

<p>Interval is working, also ajax part but the trigger isn't firing, but from the console I can see foo1 function and when I invoke it manually it works. What could be a problem?</p>
