JSFiddle - React, Tailwind, and code Playground

by techie bala

HTML

<label>You will be redirect to <span class="linkName">'jqueryexamples4u'</span> after <span class="secondsCount"> 10 </span> seconds.</label>

CSS

.linkName {
    font-weight:bold;
    color:green;
}

.secondsCount {
    font-size:25px;
    font-weight:bold;
    color:Red;
}

JavaScript

$(function () {
    window.setInterval(function () {
        var startingSeconds = $(".secondsCount").text();
        startingSeconds = eval(startingSeconds);
        if (startingSeconds == 0) {
            location.href = "http://jqueryexamples4u.blogspot.in";
        } else {
            // decrease seconds counts by 1
            $(".secondsCount").text(startingSeconds - 1);
        }
    }, 1000);
});