1<script src="jquery-3.2.1.min.js"></script>
2<script src="ResponsiveSlides/responsiveslides.min.js"></script>
3<script>
4 $(function() {
5 $("#slider").responsiveSlides({
6 auto : false,
7 pager : false,
8 nav : true,
9 speed : 500,
10 namespace : "slider-callback",
11 maxwidth : "550px"
12 });
13
14 });
15</script>
1
2<input className="newpost-rating-slider" type="range" name="rangeInput"
3min="0" max="5" onChange={handleSliderRating} />
4
5<span className="slider-rating-field">0/5</span>
6
7
8
9const handleSliderRating = () => {
10
11 var curVal = document.querySelector('.newpost-rating-slider').value;
12 var sliderRatingEle = document.querySelector('.slider-rating-field');
13
14 sliderRatingEle.textContent = curVal.toString() + "/5";
15
16 }