JSFiddle - React, Tailwind, and code Playground

by magicalex

HTML

<div data-height="100"></div>

CSS

div {
    height: 100px;
    width: 33px;
    background: red;
}

JavaScript

$('div').click(function(){
   var divheight = ($(this).height()==$(this).data('height') ? 50 : $(this).data('height'));
   $(this).height(divheight);
});