JSFiddle - React, Tailwind, and code Playground

by sushanth009

HTML

<a href="#" class="imagemodal"><img src="/images/psmith/5/image.jpg" /></a>

JavaScript

$(document).on('click', '.imagemodal', function() {
    var imgsrc = $('img', this).attr("src");
    alert("IMG: " + imgsrc);
});