JSFiddle - React, Tailwind, and code Playground

HTML

<div id="moveme"></div>

CSS

#moveme {
    position: absolute;
    width: 150px;
    height: 100px;
    background: red;
}

JavaScript

$(document).ready(function() {
    var canMove = true;

    $("#moveme").hover(function() {
        if(canMove) {
            canMove = false;
            
            $(this).css("left", "50px");
            setTimeout(function() { canMove = true; }, 1000);
        }
    }, function() {
        $(this).css("left", "10px");
    });
});