JSFiddle - React, Tailwind, and code Playground
HTML
<div class="event"><img src="starter source">Event Name</div>
<a href="#" id="get">Get Source</a><br /><a href="#" id="set">Set Source to "new source"</a>
JavaScript
$('#get').on('click', function () {
alert($('.event').children('img').attr('src'));
});
var counter = 1;
$('#set').on('click', function () {
$('.event').children('img').attr('src', 'new source (' + (counter) + ')');
counter++;
});