Callback failing if contains ajax
<p>I'm trying to add a callback to a pre existing function in the jquery plugin nitelite <a href="https://github.com/premasagar/nitelite" rel="nofollow">https://github.com/premasagar/nitelite</a> - The callback works fine <a href="http://jsfiddle.net/HPc4e/2/" rel="nofollow">http://jsfiddle.net/HPc4e/2/</a> - unless I have ajax in the callback?</p>

<p>Appropriate section of close function:</p>

<pre><code>// Blah blah ...

else {

    showFlash();

    this.overlay.remove();

    this.container
        .empty()
        .remove();

    $(this).triggerHandler('close');

    // Add callback
    if (typeof callback == "function") {
        callback();
    }

}
return this;
</code></pre>

<p>Callback:</p>

<pre><code>lb.close(undefined, 'click', function() {
    $.ajax({
        type: 'POST',
        url: url,
        data: {submit: $(this).val()},
        dataType: 'json',
        success: function(data) {
            lightbox('Lightbox 2', '&lt;p&gt;Oh hi&lt;/p&gt;', 'lightbox2');
        }
    });
});
</code></pre>

<p>Thanks</p>
