1
0
mirror of https://github.com/thangisme/notes.git synced 2024-09-07 06:24:27 -04:00

Fixed js browser incompatibility

(cherry picked from commit 9f3f38acf4e1ac40e3fb2b2f86018d4cba28dd07)
This commit is contained in:
Silvio Giebl 2019-08-10 23:44:10 +02:00
parent a5842c0d7b
commit e13a62b7b5

View File

@ -27,11 +27,11 @@ function initNav() {
jtd.addEvent(document, 'click', function(e){
var target = e.target;
while (target && !(target.classList && target.classList.contains('nav-list-expander'))) {
target = target.parentElement;
target = target.parentNode;
}
if (target) {
e.preventDefault();
target.parentElement.classList.toggle('active');
target.parentNode.classList.toggle('active');
}
});