Another way would be to bind the element above in dom and check the type of target. For instance:
$('#div').bind('click', function (event) { target = $(event.target); if (target.hasClass('lightbox')) {
Just donβt go too far, otherwise you will be too many clicks.
Hutch source share