<div id="element"></div>
body {
  padding: 15px;
}

#element {
  width: 100px;
  height: 100px;
  background: blue;
  transition: transform 1s;
  transform: translateY(0);
}

.move {
  transform: translateY(185px) !important; /* invert: -185 */
}  
View Compiled
setInterval(function(){ 
  $('#element').toggleClass('move') 
}, 1000);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.1/web-animations.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js