aboutsummaryrefslogtreecommitdiff
path: root/weblog/static/weblog/js
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-10-06 03:21:39 +0300
committerYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-10-06 03:21:39 +0300
commit55a4d5d6f9b4604c232871f152dda76b954a95b0 (patch)
tree154bdf91b01b6aed5506a7ca329725be98de24d3 /weblog/static/weblog/js
parent53c5303578ff6741e259949f4ecec295fa54a172 (diff)
downloadw3blog-55a4d5d6f9b4604c232871f152dda76b954a95b0.tar.gz
w3blog-55a4d5d6f9b4604c232871f152dda76b954a95b0.zip
no jquery, js updated, no bootstrap
Diffstat (limited to 'weblog/static/weblog/js')
-rwxr-xr-xweblog/static/weblog/js/weblog.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/weblog/static/weblog/js/weblog.js b/weblog/static/weblog/js/weblog.js
index 164cc3b..af9b9ea 100755
--- a/weblog/static/weblog/js/weblog.js
+++ b/weblog/static/weblog/js/weblog.js
@@ -1,13 +1,13 @@
function toggleNode(caller){
- state = $(caller).attr('node-state');
- target = $(caller).attr('node-target');
+ state = caller.getAttribute('node-state');
+ target = document.getElementById(caller.getAttribute('node-target'));
if(state=='closed'){
- $(caller).html('—');
- $(caller).attr('node-state', 'open');
+ caller.innerHTML = '—';
+ caller.setAttribute('node-state', 'open');
}
else{
- $(caller).html('+');
- $(caller).attr('node-state', 'closed');
+ caller.innerHTML = '+';
+ caller.setAttribute('node-state', 'closed');
}
- $('#'+target).toggle();
+ target.classList.toggle('show');
}