Invoke class method when slider value change
Hi there,
In the following code, how can I make this.setValue to invoke when #sldr value change ?
function test() {
this.setValue = function () {
$("#lbl").text($('#sldr').val());
}
$("<input id='sldr' type='range' oninput='this.setValue' min='0' max='255' value='255' />").appendTo("body");
$("<label id='lbl />").text("label").appendTo("body");
}
$(function () {
new test();
});