cm107 commited on
Commit
f33e4d0
·
1 Parent(s): 43b6a47

Made it so that the style of the language buttons change after being clicked.

Browse files
Files changed (1) hide show
  1. langNav.js +4 -0
langNav.js CHANGED
@@ -23,9 +23,13 @@ for (let ele of langNavigator.children) {
23
  ele.addEventListener(
24
  'mouseup',
25
  (e) => {
 
 
 
26
  let path = langNavMap[ele.id];
27
  console.log("Loading " + path);
28
  load_info(path);
 
29
  }
30
  );
31
  }
 
23
  ele.addEventListener(
24
  'mouseup',
25
  (e) => {
26
+ for (let btn of document.getElementsByClassName('activeLangBtn')) {
27
+ btn.className = 'nonactiveLangBtn';
28
+ }
29
  let path = langNavMap[ele.id];
30
  console.log("Loading " + path);
31
  load_info(path);
32
+ ele.className = 'activeLangBtn';
33
  }
34
  );
35
  }