Change tabpanels so the non active ones are hidden by default

This commit is contained in:
conzett 2011-11-22 21:05:18 -05:00
parent 2cd63df1b7
commit 9eb4ad54a9

View File

@ -55,6 +55,8 @@
$(tabs).first().attr('aria-selected', 'true');
}
var activeClass = this.options.activeClass;
$(tabPanels).each(function(index) {
var id = $(this).attr('id');
@ -68,14 +70,12 @@
$(tabs[index]).attr('aria-controls', $(this).attr('id'));
if($(tabs[index]).attr('aria-selected') == 'true'){
$(this).attr('aria-hidden', 'false');
$(this).attr('aria-hidden', 'false').css('display', 'block').addClass(activeClass);
}else{
$(this).attr('aria-hidden', 'true');
$(this).attr('aria-hidden', 'true').css('display', 'none');
}
});
var activeClass = this.options.activeClass;
});
$(tabs).click(function() {
var controls = $(this).attr('aria-controls');