Алмат,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.slider{
width: 300px;
margin: 10px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/south-street/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script>
$(function() {
var arr = [];
function foo()
{
$(".res").text(arr)// тут все значения, делайте что хотите
};
$(".opt").each(function(i, el) {
arr[i] = 50;
var am = $(".amount", el),
sl = $(".slider", el);
sl.slider({
min: 0,
max: 100,
step: 1,
slide: function(event, ui) {
am.val(ui.value);
arr[i] = +ui.value;
foo()
},
change: function(event, ui) {
am.val(ui.value)
}
});
sl.slider("option", "value", 50)
});
foo()
});
</script>
</head>
<body>
<div class="opt">
<div class="slider"></div>
<input type="text" class="amount" readonly>
</div>
<div class="opt">
<div class="slider"></div>
<input type="text" class="amount" readonly>
</div>
<div class="opt">
<div class="slider"></div>
<input type="text" class="amount" readonly>
</div>
<div class="opt">
<div class="slider"></div>
<input type="text" class="amount" readonly>
</div>
<div class="res"></div>
</body>
</html>