Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #17 from LoonyPandora/master

Add active class to the currently active tab-content.
  • Loading branch information...
commit b61c4b890fc0200fbd7f133fa3e6e8d1c29bc365 2 parents 0eed0f8 + 8b05d2b
@dhg dhg authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 javascripts/app.js
View
7 javascripts/app.js
@@ -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');
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.