How can i access the value of the moving slider in a jquery variable
- by user1673591
html
<h1>HTML Slider Test</h1>
<div class="slider" data-max="10"></div>
<p>Your slider has a value of <span class="slider-value"></span></p>
<div class="slider" data-max="100"></div>
<p>Your slider has a value of <span class="slider-value"></span></p>
jquery
$(".slider").each(function() {
$(this).slider({
value : 1,
min : 1,
max : $(this).data('max'),
step : 1,
slide : function (event, ui) {
var a= $(this).next().find('span.slider-value').html(ui.value);
}
});
});
I want the value of the moving slider in a jquery variable