<input id="bob" name="bob" type="range" min=15 max=120 value=85 step=5 style="width: 35%;"> <output for="bob">1</output> <span>(2)最小値:15 最大値:120 初期値:85 増減単位:5</span>
$(function() { var el, newPoint, newPlace, offset; $("input[type='range']").change(function() { el = $(this); width = el.width(); newPoint = (el.val() - el.attr("min")) / (el.attr("max") - el.attr("min")); offset = -1.3; if (newPoint < 0) { newPlace = 0; } else if (newPoint > 1) { newPlace = width; } else { newPlace = width * newPoint + offset; offset -= newPoint;} el .next("output") .css({ left: newPlace, marginLeft: offset + "%" }) .text(el.val()); }) .trigger('change'); });