Permalink
Browse files

Merge pull request #17 from LoonyPandora/master

Add active class to the currently active tab-content.
  • Loading branch information...
2 parents 0eed0f8 + 8b05d2b commit b61c4b890fc0200fbd7f133fa3e6e8d1c29bc365 @dhg dhg committed Jun 12, 2011
Showing with 3 additions and 4 deletions.
  1. +3 −4 javascripts/app.js
View
@@ -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');
}
});

0 comments on commit b61c4b8

Please sign in to comment.