aboutsummaryrefslogtreecommitdiff
path: root/weblog/static/weblog/js
diff options
context:
space:
mode:
Diffstat (limited to 'weblog/static/weblog/js')
-rw-r--r--weblog/static/weblog/js/weblog.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/weblog/static/weblog/js/weblog.js b/weblog/static/weblog/js/weblog.js
new file mode 100644
index 0000000..b802841
--- /dev/null
+++ b/weblog/static/weblog/js/weblog.js
@@ -0,0 +1,13 @@
+function toggleNode(caller){
+ state = $(caller).attr('node-state');
+ target = $(caller).attr('node-target');
+ if(state=='closed'){
+ $(caller).html('—');
+ $(caller).attr('node-state', 'open');
+ }
+ else{
+ $(caller).html('+');
+ $(caller).attr('node-state', 'closed');
+ }
+ $('#'+target).toggle();
+} \ No newline at end of file