2013-03-05 23:26:57 -08:00
|
|
|
$(function() {
|
|
|
|
$(".controls").hide();
|
2013-03-05 23:53:22 -08:00
|
|
|
$(".child").click(function(e) {
|
2013-03-05 23:26:57 -08:00
|
|
|
$(this).next(".controls").toggle();
|
|
|
|
});
|
2013-03-05 23:53:22 -08:00
|
|
|
$(".btn").click(function(e) {
|
|
|
|
var amount = $(this)[0].value;
|
|
|
|
var name = $(this).parent().parent().parent().prev().find(".name").text();
|
|
|
|
console.log(name + " " + amount);
|
|
|
|
});
|
2013-03-05 23:26:57 -08:00
|
|
|
});
|