Add bit that visibly hides the panels
This commit is contained in:
parent
24d30cc9df
commit
8aa95004fc
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
var pluginName = 'skeletonTabs',
|
var pluginName = 'skeletonTabs',
|
||||||
defaults = {
|
defaults = {
|
||||||
propertyName: "value"
|
activeClass: "active"
|
||||||
};
|
};
|
||||||
|
|
||||||
function Plugin( element, options ) {
|
function Plugin( element, options ) {
|
||||||
@ -77,10 +77,10 @@
|
|||||||
|
|
||||||
$(tabs).click(function() {
|
$(tabs).click(function() {
|
||||||
var controls = $(this).attr('aria-controls');
|
var controls = $(this).attr('aria-controls');
|
||||||
$(this).siblings().attr('aria-selected', 'false');
|
$(this).siblings().attr('aria-selected', 'false').removeClass(this.options.activeClass);
|
||||||
$(this).attr('aria-selected', 'true');
|
$(this).attr('aria-selected', 'true').addClass(this.options.activeClass);
|
||||||
$(tabPanels).attr('aria-hidden', 'true');
|
$(tabPanels).attr('aria-hidden', 'true').css('display', 'none').removeClass(this.options.activeClass);
|
||||||
$(tabPanels).filter('#' + controls).attr('aria-hidden', 'false');
|
$(tabPanels).filter('#' + controls).attr('aria-hidden', 'false').css('display', 'block').addClass(this.options.activeClass);
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user