JSFiddle - React, Tailwind, and code Playground

http://stackoverflow.com/questions/7302824/animating-addclass-removeclass-with-jquery

by Thanos Saringelos

HTML

<div id="test"  ></div>

CSS

#test{
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    transition: all 0.5s ease;
    height: 100px;
    background-color:#000000;
}
.megalwse{ 
    height: 100px;
}
.mikrine{
    height: 2px;
}

JavaScript

$('#test').hover(function() {
    $(this).addClass('megalwse');
}, function() {
    $(this).removeClass('mikrine');
});