HTML & CSS - Hover state maintained after transition

Simple example for StackOverflow

HTML

<div id="container">
    <div id="content">Hover me !</div>
</div>

CSS

/** The problem **/
#content.down  {
    background-color: deepskyblue;
    transform:translateY(300px);
    -webkit-transform: translateY(300px);
}
/** Just for fun **/
 html, body {
    height: 100%;
    overflow: hidden;
}
#container {
    width: 80%;
    height: 80%;
    background: beige;
    border: 1px solid black;
    border-radius: 5px;
    margin: 10px auto;
    padding: 10px;
}
#content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: coral;
    border: 1px solid black;
    border-radius: 5px;
    margin: 10px auto;
    padding: 10px;
    
    cursor: pointer;
    transition: 1s 500ms;
    transition-property: transform, background-color;
}

JavaScript

$('#content').on('mouseover', function() {
    $(this).toggleClass('down');
});