JSFiddle - React, Tailwind, and code Playground

by bruno

HTML

<a href="#" id="1">1</a>
<a href="#" id="2">2</a>
and Jquery functions like this

CSS

a {
    background-color: yellow;
}

JavaScript

$(document).ready(function (){

 $('#1').click(function(){
      $("#1").animate({ "opacity": "1"}, 1000);
      $("#2").animate({ "opacity": "0"}, 1000);
     
   });

   $('#2').click(function(){
       $("#1").animate({ "opacity": "0"}, 1000);
      $("#2").animate({ "opacity": "1"}, 1000);
   });
});