JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/ui-lightness/jquery-ui.css">
<div id='box'>
click me, then press escape
</div>
CSS
#box {
width: 100px;
height: 100px;
border: 2px dashed orange;
}
JavaScript
$('#box').click(function() {
$(this).animate({width: 200,height: 200});
});
$(document).keyup(function( event ) {
if(event.which === 27) {
$('#box').animate({width: 100,height: 100});
}
});