JSFiddle - React, Tailwind, and code Playground

by kevinPHPkevin

HTML

<a href="#" class="About">About</a>
<a href="#" class="Contact">Contact</a>

<div id="Contact">This is my Contact section</div>
<div id="About">This is my About section</div>

CSS

div {
    width: 200px;
    height:200px;
    position: absolute;
    left:0;
    top:30px;
}
#About {
   background: red; 
}
#Contact {
    background: blue; 
}

JavaScript

$('.About').click(function(){
    $('#About').show();
    $('#Contact').hide();
})
$('.Contact').click(function(){
    $('#Contact').show();
    $('#About').hide();
})