JSFiddle - React, Tailwind, and code Playground

HTML

<li> <span>SomeText</span>
 <a href='someurl'>sometext</a>

</li>

CSS

.active {
    color:red;
}

JavaScript

$("li").click(function (e) {

    alert("li");
});

$("a").click(function (e) {
    e.preventDefault();
    e.stopPropagation();
    alert("a");
});