JSFiddle - React, Tailwind, and code Playground

by Porfirio Chavez

HTML

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

<button>
some
</button>

CSS

input {
    border: 2px solid black;
    height: 50px;
}
input.highlight {
    border: 2px solid red;
}

JavaScript

$('button').on('click', function() {
    var jElement = $('#text');
    jElement.addClass('highlight');
    setTimeout(function() { jElement.addClass('highlight')
        setTimeout(function(){ jElement.removeClass('highlight')
        		setTimeout(function() { jElement.addClass('highlight')
            	setTimeout(function(){ jElement.removeClass('highlight')
              }, 100)
            }, 100);
          }, 100);
        }, 100);
});