JSFiddle - React, Tailwind, and code Playground

by TJ VanToll

HTML

<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<link href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<!--
<link href="http://code.jquery.com/ui/jquery-ui-git.css" rel="stylesheet" />
<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
-->

<img src="http://placekitten.com/200/200"/>
<br />
<a href="#">Enable</a>

CSS

.ui-wrapper {
    position : relative!important;
}

.ui-resizable-se {
    position : absolute;
    bottom   : 0;
    right    : 0;
    width    : 6px;
    height   : 6px;
    background-color : white;
    border:  1px solid black;
    cursor: se-resize;
}

img {
    border: 5px solid red;
}

JavaScript

var active = false;
var img = $('img');
$('a').click(function() {
    if(active) {
        img.resizable('destroy');
        $('a').text('Enable');
    } else {
        img.resizable();
        $('a').text('Disable');
    }
    active = !active;
});