Got app working

This commit is contained in:
sm
2013-03-08 22:28:24 -08:00
parent 6a62e10c26
commit d48fd3f852
6 changed files with 49 additions and 17 deletions
+4 -3
View File
@@ -4,8 +4,9 @@ $(function() {
$(this).next(".controls").toggle();
});
$(".btn").click(function(e) {
var amount = $(this)[0].value;
var name = $(this).parent().parent().parent().prev().find(".name").text();
console.log(name + " " + amount);
var target = $(this).val();
var req = $.get(target, function(data) {
$("." + data["name"]).next().text(data["amount"]);
});
});
});