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);     } 

demo: http://jsfiddle.net/lotusgodkk/gcu2d/723/


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -