JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<section class=widget>
<h4 class=widget-title>Top Gainers</h4>
<div class=loadingWrapforlatestnews></div>
<div class="menu-wrapper">
<ul class="menu">
<li><a href="#1d">1D</a>
</li>
<li><a href="#1w">1W</a>
</li>
<li><a href="#2w">2W</a>
</li>
<li><a href="#2w">3W</a>
</li>
<li><a href="#1m">1M</a>
</li>
</ul>
</div>
<div class=tab-container-1>
<table id=1d class="tab-content-1 table table-striped">
</table>
<table id=1w class="tab-content-1 table table-striped">
</table>
<table id=2w class="tab-content-1 table table-striped">
</table>
<table id=3w class="tab-content-1 table table-striped">
</table>
<table id=1m class="tab-content-1 table table-striped">
</table>
</div>
</section>
CSS
.menu-wrapper {
width: 100%;
display: table;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.menu {
display: table-row;
}
.menu li {
display: table-cell;
float: none;
}
.menu li a {
display: block;
padding: 8px 15px;
background: #2767A0;
font-family: Tahoma;
font-size: 12px;
color: #fff;
text-decoration: none;
text-align: center;
text-transform: uppercase;
}
.menu li a:hover {
background: #528CBF;
transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
}
JavaScript
$(document).ready(function() {
$("ul.menu li a:first").click();
});
$("ul.menu li").click(function() {
var tabclicked = $(this).find("a").attr("href");
alert(tabclicked);
});