<div id="slider"></div>
<div id="value"></div>
const min = 100;
const max = 500;
$('#slider').slider({
min,
max,
value: min + Math.random() * (max - min) | 0,
range: 'min',
animate: 'fast',
slide: (e, ui) => $('#value').html(max - ui.value + min),
});