mirror of
https://github.com/thangisme/notes.git
synced 2025-01-03 05:26:36 -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){
|
jtd.addEvent(document, 'click', function(e){
|
||||||
var target = e.target;
|
var target = e.target;
|
||||||
while (target && !(target.classList && target.classList.contains('nav-list-expander'))) {
|
while (target && !(target.classList && target.classList.contains('nav-list-expander'))) {
|
||||||
target = target.parentElement;
|
target = target.parentNode;
|
||||||
}
|
}
|
||||||
if (target) {
|
if (target) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
target.parentElement.classList.toggle('active');
|
target.parentNode.classList.toggle('active');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user