blob: 77ef94074c57ca2272f07be16b9a25c929d03ff9 [file] [log] [blame]
$(document).ready(function () {
function label(lbl) {
return lbl.replace(/[ .]/g, '-').toLowerCase();
}
function showContent() {
$('.opt-group .opt').each(function(){
$('.'+label($(this).text())).hide();
$('.highlight-'+label($(this).text())).hide();
});
$('.opt-group .active').each(function(){
$('.'+label($(this).text())).show();
$('.highlight-'+label($(this).text())).show();
});
}
showContent();
function setContent() {
var el = $(this);
el.siblings().removeClass('active');
el.addClass('active');
showContent();
}
$('.opt-group').on('click', '.opt', setContent);
});