diff options
Diffstat (limited to 'weblog/static/weblog/js/weblog.js')
-rwxr-xr-x | weblog/static/weblog/js/weblog.js | 14 |
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'); } |