nav a#btn1 {
background-position:0px 0px;
width:82px;
}
nav a#btn1:hover {
background-position:0px -82px;
}
nav a#btn1.active {
background-position:0px -164px;
}
nav a#btn2 {
background-position:-108px 0px;
width:82px;
}
nav a#btn2:hover {
background-position:-108px -82px;
}
nav a#btn2.active {
background-position:-108px -164px;
outline: none;
}
.nav a .active{
font-weight:700;
}
.active{font-weight:700; }
JavaScript
$("nav li").click(function() {
$("nav li a.active").removeClass("active"); //Remove any "active" class
$("a", this).addClass("active"); //Add "active" class to selected tab
$(activeTab).show(); //Fade in the active content
return false;
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.