JSFiddle - React, Tailwind, and code Playground
HTML
<img id="arrow" src="/src/east.gif" />
CSS
#arrow {
display: block;
width: 10px;
height: 10px;
border: 1px solid #000;
}
JavaScript
$('#arrow').toggle(
function() { alert(this.src); this.src = '/src/south.gif'; },
function() { alert(this.src); this.src = 'http://www.doghouseprojects.com/images/assoc/painted.jpg; }
);