added and hiding buttons

This commit is contained in:
Stephen McQuay 2013-03-05 23:15:25 -08:00
parent 55ad067967
commit c1787b71b7
2 changed files with 46 additions and 20 deletions

View File

@ -17,5 +17,6 @@
</section> </section>
<script src="/s/jquery-latest.js"></script> <script src="/s/jquery-latest.js"></script>
<script src="/s/bootstrap/js/bootstrap.min.js"></script> <script src="/s/bootstrap/js/bootstrap.min.js"></script>
{{ template "script" . }}
</body> </body>
</html> </html>

View File

@ -1,9 +1,11 @@
{{ define "title" }}Welcome{{ end }} {{ define "title" }}Welcome{{ end }}
{{ define "content" }} {{ define "content" }}
<div class="container pw"> <div class="container">
<table class="table table-striped table-bordered table-hover"> <table class="table table-striped table-bordered table-hover">
<tr> <caption>Allowance totals for our children</caption>
</thead>
<tr class="info">
<td> <td>
Name Name
</td> </td>
@ -11,17 +13,40 @@
Amount Amount
</td> </td>
</tr> </tr>
</thead>
<tbody>
{{ range .children }} {{ range .children }}
<tr> <tr>
<td> <td class="name">
{{ .Name }} {{ .Name }}
</td> </td>
<td> <td>
{{ dollarize .Money }} {{ dollarize .Money }}
</td> </td>
</tr> </tr>
<tr class="controls">
<td colspan=2>
<div class="btn-group">
<button class="btn" value=100>$1.00</button>
<button class="btn" value=25>25&cent;</button>
<button class="btn" value=10>10&cent;</button>
<button class="btn" value=5>5&cent;</button>
</div>
</td>
</tr>
{{ end }} {{ end }}
</ul> </tbody>
</table> </table>
</div> </div>
{{ end }} {{ end }}
{{ define "script" }}
<script>
$(function() {
$(".controls").hide();
$(".name").click(function(e) {
console.log(e)
});
});
</script>
{{ end }}