Merge pull request #17 from LoonyPandora/master

Add active class to the currently active tab-content.
This commit is contained in:
Dave Gamache 2011-06-12 10:07:03 -07:00
commit b61c4b890f

View File

@ -12,8 +12,7 @@ $(document).ready(function() {
/* Tabs Activiation
================================================== */
var tabs = $('ul.tabs'),
tabsContent = $('ul.tabs-content');
var tabs = $('ul.tabs');
tabs.each(function(i) {
//Get all tabs
@ -32,8 +31,8 @@ $(document).ready(function() {
tab.removeClass('active');
$(this).addClass('active');
//Show Tab Content
$(contentLocation).show().siblings().hide();
//Show Tab Content & add active class
$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');
}
});