I am using Jquery version 1.7.1 on my webpage.
I have several div's on my webpage.
In each div, there is one tab container containing 3-4 tabs.
on link click, I am displaying only one div at a time.
Problem, I am facing is that first tab content not displaying by default.
$(document).ready(function () {
//Hide all content
$(".tab_content").hide();
//Activate first tab
$("ul.tabs li:first").addClass("active").show();
//Show first tab content
$(".tab_content:first").show();
//On Click Event
$("ul.tabs li").click(function() {
//Remove any "active" class
$("ul.tabs li").removeClass("active");
//Add "active" class to selected tab
$(this).addClass("active");
//Hide all tab content
$(".tab_content").hide();
//Find the rel attribute value to identify the active tab + content
var activeTab = $(this).find("a").attr("href");
//Fade in the active content
$(activeTab).fadeIn();
return false;
});
});
Please Help.