// support close lightbox with click outside @since 5.0.9
		$(document).on('click', function(e) {
		    const $open = $('.evo_lightbox.show');
		    if ($open.length === 0) return;

		    if (!document.contains(e.target)) return;

		    // If clicked inside any .evolb_box → do nothing
		    if ($(e.target).closest('.evolb_box').length) return;

		    // Otherwise close the topmost lightbox
		    $open.last().evo_lightbox_close({ delay: 300 });
		});
lightbox close click outside 5.0.9
Code created on: 2026-04-02 16:09:22