phonex,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.disabled {
background: #FFCC00;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function() {
var popup = $(".popup");
popup.on('click', '.btn', function() {
$(this).addClass('disabled').text('Идет выдача товара ...')
var counts = $(this).prev().val();
alert([counts, this.id]);
});
});
</script>
</head>
<body>
<div class="popup">
<h1>5 руб</h1>
<div class="popup_list_img">
<div class="list_img"><img src="/upload/shop/S_wood.png" width="50px">
</div>
</div>
<div class="popup-content">Древесина (Wood) 2</div>
<div class="popup-form">
<div class="ms">Кол-во:</div>
<input type="text" class="count" name="counts" id="counts" value="1">
<button type="button" class="btn btn-danger" id="Buy31">Получить товар</button>
</div>
<a class="close" title="Закрыть" href="#close"></a>
</div>
<div class="popup">
<h1>6 руб</h1>
<div class="popup_list_img">
<div class="list_img"><img src="/upload/shop/S_wood.png" width="50px">
</div>
</div>
<div class="popup-content">Древесина (Wood) 2</div>
<div class="popup-form">
<div class="ms">Кол-во:</div>
<input type="text" class="count" name="counts" id="counts" value="1">
<button type="button" class="btn btn-danger" id="Buy32">Получить товар</button>
</div>
<a class="close" title="Закрыть" href="#close"></a>
</div>
</body>
</html>