Switch all the Sass/SCSS tabs together

This commit is contained in:
Thomas Tortorini 2015-08-14 08:20:00 +02:00
parent 99baca03d3
commit 2afc346f0f

View File

@ -15,4 +15,24 @@ $(function() {
$( this ).removeClass( "ui-state-hover" );
}
);
// Switch ALL the tabs (Sass/SCSS) together
var
noRecursion = false,
jqA = $( "a.ui-tabs-anchor" ),
jqASass = jqA.filter( ":contains('Sass')" ).click(function() {
if ( !noRecursion ) {
noRecursion = true;
jqASass.not( this ).click();
noRecursion = false;
}
}),
jqASCSS = jqA.filter( ":contains('SCSS')" ).click(function() {
if ( !noRecursion ) {
noRecursion = true;
jqASCSS.not( this ).click();
noRecursion = false;
}
})
;
});