JSFiddle - React, Tailwind, and code Playground

by Kishore Sahasranaman

HTML

<label for="strStat">Strength
    <output id="forStr" for="strStat">12</output>
</label>
<input type="range" id="strStat" class="stat" name="strStat" min="3" max="20">

JavaScript

jQuery.fn.extend({
    printRangeValue: function () {
        console.log(this);
        $(this).prev().children("output").text($(this).val());
    }
});

$(document).ready(function () {
    $("#strStat").printRangeValue();
    $("#conStat").printRangeValue();
});