JSFiddle - React, Tailwind, and code Playground
by mohammadAdil
HTML
<img id="image1" src="http://placehold.it/200/red" alt="facebook.com">
JavaScript
$('#image1').mouseenter(function() {
$(this).attr('src', 'http://placehold.it/200/red');
});
$('#image1').mouseleave(function() {
$(this).attr('src', 'http://placehold.it/200/green');
});