Add code for handeling clicking on tabs
This commit is contained in:
parent
6f1c6e02e3
commit
085f412500
@ -73,7 +73,15 @@
|
|||||||
$(this).attr('aria-hidden', 'true');
|
$(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');
|
||||||
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -186,6 +186,7 @@ $(document).ready(function () {
|
|||||||
var tabContainer = $('#qunit-fixture #tab-container');
|
var tabContainer = $('#qunit-fixture #tab-container');
|
||||||
var tabList = $(tabContainer).find('> ul');
|
var tabList = $(tabContainer).find('> ul');
|
||||||
var tabPanels = $(tabContainer).children().not('ul');
|
var tabPanels = $(tabContainer).children().not('ul');
|
||||||
|
var tabs = tabList.find('li');
|
||||||
tabContainer.skeletonTabs();
|
tabContainer.skeletonTabs();
|
||||||
var clickMe = $(tabContainer).find("ul li:nth-child(2)");
|
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){
|
if(index != 1){
|
||||||
equals($(this).attr('aria-hidden'),
|
equals($(this).attr('aria-hidden'),
|
||||||
'true',
|
'true',
|
||||||
|
Loading…
Reference in New Issue
Block a user