JSFiddle - React, Tailwind, and code Playground

HTML

<div class="lightbox">
    <a href="#" id="test1">test 1</a>
    <a href="#" id="test2">test 2</a>
    <a href="#" id="test3">test 3</a>
</div>

JavaScript

jQuery(document).ready(function($) {
    $(".lightbox a").each(function() {
        $(this).on('click', {param: this.id}, functionName);
    });
});

function functionName(event) {
    event.preventDefault();
    console.log(event.data.param)
}