JSFiddle - React, Tailwind, and code Playground
HTML
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<div id="navbar">
<ul>
<li class="active"><a href="#" title="Projects">Projects<span class="notification">34</span></a></li>
<li class="inactive"><a href="#" title="Contacts">Contacts</a></li>
<li class="inactive"><a href="#" title="Earnings">Earnings</a></li>
<li class="inactive"><a href="#" title="To-do">To-do<span class="notification">100</span></a></li>
</ul>
</div>
<div id="slider">
<h2>Projects</h2>
<p>Professionally cultivate stand-alone core competencies whereas distributed web services. Rapidiously streamline bleeding-edge total linkage after multidisciplinary networks. Authoritatively create multifunctional methodologies through premier collaboration and idea-sharing.
Phosfluorescently evisculate global manufactured products whereas customized total linkage. Appropriately optimize resource maximizing core competencies via an expanded array of functionalities.</p>
<h2>Contacts</h2>
<p>Professionally cultivate stand-alone core competencies whereas distributed web services. Rapidiously streamline bleeding-edge total linkage after multidisciplinary networks. Authoritatively create multifunctional methodologies through premier collaboration and idea-sharing.
Phosfluorescently evisculate global manufactured products whereas customized total linkage. Appropriately optimize resource maximizing core competencies via an expanded array of functionalities.</p>
<h2>Earnings</h2>
<p>Professionally cultivate stand-alone core competencies whereas distributed web services. Rapidiously streamline bleeding-edge total linkage after multidisciplinary networks. Authoritatively create multifunctional methodologies through premier collaboration and idea-sharing.
Phosfluorescently evisculate global manufactured products whereas customized total linkage. Appropriately...
CSS
body {
margin: 0;
padding: 0;
font-family: helvetica, tahoma, Sans-serif;
font-size: 13px;
background: url(https://dl.dropbox.com/u/2022205/untitled-1.jpg) repeat;
}
a {
text-decoration: none;
}
h2 {
font-family: Helvetica, tahoma, Sans-serif;
font-size: 25px;
font-weight: bold;
text-shadow: 0 1px 1px white;
}
p {
text-shadow: 0 1px 1px white;
}
#navbar {
margin: 20px 0 0 40px;
width: 650px;
font-weight: bold;
}
/*###########################################
ul li (all)
###########################################*/
ul li{
display: inline-block;
}
ul li a {
position: relative;
display: block;
width: 150px;
text-align: center;
}
/*###########################################
Active
###########################################*/
.active a{
padding: 28px 0 20px 0;
background: -webkit-gradient(linear, left top, left bottom, from(#db0000), to(#9b0000));
background: -moz-linear-gradient(top center, #db0000, #9b0000);
border: 1px solid #8d0000;
text-shadow: 0 1px 1px black;
-webkit-border-radius: 10px 10px 0 0;
-webkit-background-clip: padding-box;
-webkit-box-shadow: inset 0 0 1px #fd0000;
-moz-border-radius: 10px 10px 0 0;
-moz-background-clip: padding-box;
-moz-box-shadow: inset 0 0 1px #fd0000;
margin-left: -5px;
z-index: 2;
color: white;
text-shadow: 0 1px 1px black;
}
.active a:focus {
outline: none;
}
/*###########################################
Inactive
###########################################*/
.inactive a:hover {
background: -webkit-gradient(linear, left bottom, left top, from(#eee), to(#ddd));
background: -moz-linear-gradient(top center, #ddd, #eee);
}
.inactive a {
color: #222;
text-shadow: 0 1px 1px white;
background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ddd));
background: -moz-linear-gradient(top center, #eee, #ddd);
-webkit-box-shadow: inset 0 0 5px...
JavaScript
$(document).ready(function(){
$('li').click(function(){
var number = $(this).index();
$('h2').slideUp(400).eq(number).slideDown(400);
$('p').slideUp(400).eq(number).slideDown(400);
$('li').removeClass('inactive').addClass('active');
$('li').not(this).removeClass('active').addClass('inactive');
});
$('h2').not(':first').hide();
$('p').not(':first').hide();
});