$('#foo').slider({
range: 'min',
min: 0,
max: 1000,
step: 100,
value: 500,
create: function( event, ui) {
var bar = ui.value;
},
//etc...
});
Why is bar
undefined and not 500
? Is it possible to assign a variable to the value
in the create
event?
You can also use
create: function( e, ui ) {
var bar=$(this).slider('value');
}
DEMO.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With