JSFiddle - React, Tailwind, and code Playground

by softvar

HTML

<a href="http://www.google.com">google</a>

JavaScript

$("a").click(function(){
    $(this).addClass("classToAdd");
    alert("a tag assigned a class: "+ $(this).attr("class"));
    setTimeout(function(){
        window.location.href = $(this).attr("href");
    },1000);
    return false;
});