简体   繁体   中英

jQuery Change Values Knob

I have made a simple web app where the sine wave volume can be changed with a slider. Not problem.

However, I would like to change the value with a knob, I have tried everything I know (Change, dial, onchange etc.) but nothing seems to work.

document.getElementById('black-knob').addEventListener('change', function() {
sample.changeVolume(this);
}); 

$(function() {

        var  value = document.getElementById("black-knob").value;
        $(".knob-values").knobRot({ change : function (value) {    } 

                })
});

here there is the jsfiddle

http://jsfiddle.net/RKH35/4/

Could you help me?

what am I missing??

Looking at the source code for the plugin you may be able to use the event knobdrag .

$('#black-knob').on('knobdrag', function(){
    //called until mouse button released
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM