<input name="price_from" id="amount_before" size="6" type="text">
<br>
<input name="price_to" size="6" id="amount_after" type="text">
<div id="slider-range" style="margin-top:10px; width:400px;"></div>
$("#slider-range").slider({
range: true,
min: 100,
max: 100000,
step: 20,
values: [100, 100000],
slide: function(event, ui) {
$("#amount_before").val(ui.values[0]);
$("#amount_after").val(ui.values[1])
}
});
$('#amount_before').val($("#slider-range").slider("values", 0))
$('#amount_after').val($("#slider-range").slider("values", 1))
$('#amount_before').change(function() {
$("#slider-range").slider('values', 0, $(this).val());
});
$('#amount_after').change(function() {
$("#slider-range").slider('values', 1, $(this).val());
});