Blinking with two color || JQuery

Blink with two color || JQuery

by Intesar Haider

HTML

<div class="conflict-blink">Testing</div>

CSS

.conflict-blink {
    width:200px;
    height:20px;
    background-color:#2F424A;
    color:#fff;
    text-align:center;
    padding:10px;
    transition: .5s ease-out;
}

JavaScript

setInterval(function () {
    $(".conflict-blink").css("background-color", function () {
        this.switch = !this.switch
        return this.switch ? "#E63226" : ""
    });
}, 900)