1 $(document).ready(function() {
4 $(".tab_content").hide(); //Hide all content
5 $("ul.tabs li:first").addClass("active").show(); //Activate first tab
6 $(".tab_content:first").show(); //Show first tab content
9 $("ul.tabs li").click(function() {
10 $("ul.tabs li").removeClass("active"); //Remove any "active" class
11 $(this).addClass("active"); //Add "active" class to selected tab
12 $(".tab_content").hide(); //Hide all tab content
13 var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
14 $(activeTab).fadeIn(); //Fade in the active content