javascript - jQuery Slider value undefined -
i'm trying learn how use jquery sliders. can't value slider on change/slide. how value?
$(function() { $('.slider').slider({ value: 0, min: 0, max: 100, step: 1, change: function() { updateval(this); } }); }); function updateval(bar) { //this returns object var selection = $('.ampsli').slider('value'); alert(selection); //this returns 'undefined' alert(bar.value); }
pass ui
object in updateval:
change: function (event, ui) { updateval(ui); }
Comments
Post a Comment