JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/cupertino/jquery-ui.css">
<div id="slider"></div>
<span id="min"></span>
<span id="max"></span>
CSS
#slider
{
width: 80%;
margin-left: 1em;
}
#slider a {
text-decoration: none;
outline: none;
}
#min, #max {
width: 50px;
text-align: center;
color: black;
text-decoration: none;
}
JavaScript
$("#slider").slider({
range: true,
min: 100,
max: 500,
step: 10,
values: [100, 500],
animate: 'slow',
create: function() {
$('#min').appendTo($('#slider a').get(0));
$('#max').appendTo($('#slider a').get(1));
},
slide: function(event, ui) { $(ui.handle).find('span').html('$' + ui.value); }
});
// only initially needed
$('#min').html('$' + $('#slider').slider('values', 0)).position({
my: 'center top',
at: 'center bottom',
of: $('#slider a:eq(0)'),
offset: "0, 10"
});
$('#max').html('$' + $('#slider').slider('values', 1)).position({
my: 'center top',
at: 'center bottom',
of: $('#slider a:eq(1)'),
offset: "0, 10"
});