mirror of
https://github.com/thangisme/notes.git
synced 2024-11-03 02:07:29 -05:00
Fixed js browser incompatibility
(cherry picked from commit 9f3f38acf4e1ac40e3fb2b2f86018d4cba28dd07)
This commit is contained in:
parent
a5842c0d7b
commit
e13a62b7b5
@ -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');
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user