Skip to content
Snippets Groups Projects

Develop

Merged Ghost User requested to merge develop into main
4 files
+ 29
4
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 18
0
// pathname eg: /home
const path = $(location).attr('pathname').substr(1);
// menu: active tab
$('.nav-link').each(function() {
if (path != '') {
if (path == $(this).attr('id')) {
$(this).addClass('active');
$(this).attr('aria-current', 'page');
} else if (path.startsWith('masters')) {
$('#mastersDropdown').addClass('active');
$('#mastersDropdown').attr('aria-current', 'page');
}
} else {
$('#home').addClass('active');
$('#home').attr('aria-current', 'page');
}
});
\ No newline at end of file
Loading