JSFiddle - React, Tailwind, and code Playground

HTML

<img src="../img/logo.png" />

CSS

body { background-color: #38719B; }

JavaScript

var hasExpanded = false;
$('img').on('mousedown mouseup', function(e) {
    if (e.which == 3) {
            if (!hasExpanded) {
            $(this).animate({
                width: $(this).width() * 2,
                height: $(this).height() * 2,
            }, 500);
        }
        hasExpanded = true;
    }
}).mouseleave(function(e) {
    if (hasExpanded  == true) {
    $(this).animate({
        width: $(this).width() / 2,
        height: $(this).height() / 2,
    }, 500);
    hasExpanded = false;
}
});