trigger event before content is parsed after ajax
Are you using AJAX API? All the Ajax commands have the same return, for example

array(
    'command' =&gt; 'insert',
    'method' =&gt; 'html',
    'selector' =&gt; $selector,
    'data' =&gt; $html,
    'settings' =&gt; $settings,
);


And if you open the file misc/ajax.js, you will find insert() function in Drupal.ajax.prototype.commands. I think now you got the idea right? You just need to define a new ajax command by extending standard library, for example 

Drupal.ajax.prototype.commands.lightbox = function (ajax, response, status) {
    // Do something with response.
};


And on server side, you just need to return 

array(
    'command' =&gt; 'lightbox',
);


You can put more options in the command like what core does.