Added template from http://www.freehtml5templates.com/bluenightsky-html5-and-css3...
[treecutter.git] / style / bluenightsky / js / simpletabs.js
1 $(document).ready(function() {
2  
3         //Default Action
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
7         
8         //On Click Event
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
15                 return false;
16         });
17  
18 });