JSFiddle - React, Tailwind, and code Playground

by donce17

HTML

<input type="text" value="aaa" />

CSS

.blink-class {
    border: 1px solid #ee1b1b !important;
}

JavaScript

var t = null;

function blink() {
    var obj = $('input[type="text"]')
    obj.addClass("blink-class");
    t = setTimeout(function () {
        obj.removeClass("blink-class");
        t = setTimeout(function () {
            blink();
        }, 550);
    }, 550);
}
blink();


t = setTimeout(function () {
    clearTimeout(t);
}, 5000);