JSFiddle - React, Tailwind, and code Playground

HTML

<div>DIV</div>
<img src="images/hpSlider.jpg" alt="" />

JavaScript

$('div').click(function () {
    alert( $('img').attr('src') );
});