JSFiddle - React, Tailwind, and code Playground

by skram

HTML

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

CSS

body { background-color: #38719B; }

JavaScript

var hasExpanded = false;
$('img').mousedown(function(e) {
    if (e.which == 3) {
        $(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;
}
});