toggle buttons on row click
This commit is contained in:
parent
c1787b71b7
commit
5662badc50
6
static/allowances.js
Normal file
6
static/allowances.js
Normal file
@ -0,0 +1,6 @@
|
||||
$(function() {
|
||||
$(".controls").hide();
|
||||
$(".name").click(function(e) {
|
||||
$(this).next(".controls").toggle();
|
||||
});
|
||||
});
|
@ -17,6 +17,6 @@
|
||||
</section>
|
||||
<script src="/s/jquery-latest.js"></script>
|
||||
<script src="/s/bootstrap/js/bootstrap.min.js"></script>
|
||||
{{ template "script" . }}
|
||||
<script src="/s/allowances.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -16,8 +16,8 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .children }}
|
||||
<tr>
|
||||
<td class="name">
|
||||
<tr class="name">
|
||||
<td>
|
||||
{{ .Name }}
|
||||
</td>
|
||||
<td>
|
||||
@ -39,14 +39,3 @@
|
||||
</table>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "script" }}
|
||||
<script>
|
||||
$(function() {
|
||||
$(".controls").hide();
|
||||
$(".name").click(function(e) {
|
||||
console.log(e)
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user