From 5662badc50934b26875c06d76739472eb2cd3c81 Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Tue, 5 Mar 2013 23:26:57 -0800 Subject: [PATCH] toggle buttons on row click --- static/allowances.js | 6 ++++++ templates/_base.html | 2 +- templates/index.html | 15 ++------------- 3 files changed, 9 insertions(+), 14 deletions(-) create mode 100644 static/allowances.js diff --git a/static/allowances.js b/static/allowances.js new file mode 100644 index 0000000..33bf1a0 --- /dev/null +++ b/static/allowances.js @@ -0,0 +1,6 @@ +$(function() { + $(".controls").hide(); + $(".name").click(function(e) { + $(this).next(".controls").toggle(); + }); +}); diff --git a/templates/_base.html b/templates/_base.html index 3e38d76..c82e4c7 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -17,6 +17,6 @@ - {{ template "script" . }} + diff --git a/templates/index.html b/templates/index.html index e2b2aee..52edcd7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,8 +16,8 @@ {{ range .children }} - - + + {{ .Name }} @@ -39,14 +39,3 @@ {{ end }} - -{{ define "script" }} - -{{ end }}