Add code for handeling clicking on tabs
This commit is contained in:
parent
6f1c6e02e3
commit
085f412500
@ -75,6 +75,14 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(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');
|
||||||
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn[pluginName] = function ( options ) {
|
$.fn[pluginName] = function ( options ) {
|
||||||
|
@ -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