Merge pull request #17 from LoonyPandora/master
Add active class to the currently active tab-content.
This commit is contained in:
commit
b61c4b890f
@ -12,8 +12,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
/* Tabs Activiation
|
/* Tabs Activiation
|
||||||
================================================== */
|
================================================== */
|
||||||
var tabs = $('ul.tabs'),
|
var tabs = $('ul.tabs');
|
||||||
tabsContent = $('ul.tabs-content');
|
|
||||||
|
|
||||||
tabs.each(function(i) {
|
tabs.each(function(i) {
|
||||||
//Get all tabs
|
//Get all tabs
|
||||||
@ -32,8 +31,8 @@ $(document).ready(function() {
|
|||||||
tab.removeClass('active');
|
tab.removeClass('active');
|
||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
|
|
||||||
//Show Tab Content
|
//Show Tab Content & add active class
|
||||||
$(contentLocation).show().siblings().hide();
|
$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user