JSFiddle - React, Tailwind, and code Playground

HTML

<body>

<input type="text" id="div"/> 

<p>Hover over the div element above, to see the transition effect.</p>

</body>

CSS

#div {
    width: 100px;
    height: 100px;
    background: red;
    -webkit-transition: width 2s; /* For Safari 3.1 to 6.0 */
    transition: width 1s, height 1s;
}

.hovered {
    width: 300px;
    height: 300px;
}

JavaScript

$("#div").hover(function() {
    $( this ).width("300px");
    $( this ).height("300px");
});