Select Git revision
-
Aymeric Henouille authoredAymeric Henouille authored
main.js 466 B
import $ from 'jquery'
$(() => {
$('nav > ul > li > a').click(element => {
const id = element.delegateTarget.id;
$('nav > ul > li > a').removeClass('selected');
$('nav > ul > li > a#' + id).addClass('selected');
showSection(id);
});
function showSection(sectionName) {
$('body > section').hide();
$('body > section.' + sectionName + 'Container').show();
console.log(sectionName);
}
});