Add code for handeling clicking on tabs

This commit is contained in:
conzett 2011-11-22 20:42:11 -05:00
parent 6f1c6e02e3
commit 085f412500
2 changed files with 11 additions and 2 deletions

View File

@ -73,7 +73,15 @@
$(this).attr('aria-hidden', 'true');
}
});
});
$(tabs).click(function() {
var controls = $(this).attr('aria-controls');
$(this).siblings().attr('aria-selected', 'false');
$(this).attr('aria-selected', 'true');
$(tabPanels).attr('aria-hidden', 'true');
$(tabPanels).filter('#' + controls).attr('aria-hidden', 'false');
});
};

View File

@ -186,6 +186,7 @@ $(document).ready(function () {
var tabContainer = $('#qunit-fixture #tab-container');
var tabList = $(tabContainer).find('> ul');
var tabPanels = $(tabContainer).children().not('ul');
var tabs = tabList.find('li');
tabContainer.skeletonTabs();
var clickMe = $(tabContainer).find("ul li:nth-child(2)");
@ -203,7 +204,7 @@ $(document).ready(function () {
}
});
$(tabpanels).each(function(index) {
$(tabPanels).each(function(index) {
if(index != 1){
equals($(this).attr('aria-hidden'),
'true',