Q:

jQuery to update inner html when slider value changes

8 sliders on my html 5 page (input type="range").
For each of these I want the value written next to it, and to update each time the slider value changes.
I would like to do this in 1 jquery callback.
So far I have:
$('input[type="range"]').change(function(e) {
  // here I need to update the inner html for the relevant slider.
});

A:

You can get it by simply grabbing the .val() of it, and putting that value inside of a span next to it.
$('input[type="range"]').on('change', function(e) {
    var _val = $(this).val();
    $(this).next('span').text(_val);
});​

jsFiddle Demo

