Got app working
This commit is contained in:
@@ -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"]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user