jQuery-Knob
jQuery-Knob copied to clipboard
Triggering change does not call user's change callback
When I create a knob like this:
<script>
$(".dial").knob({
'change' : function (v) { console.log(v); }
});
</script>
And I trigger a change:
<script>
$('.dial')
.val(27)
.trigger('change');
</script>
I think that my change callback should be called, but it isn't.
Here is and example: http://codepen.io/ThomasKliszowski/pen/GgpjdX
@ThomasKliszowski which browser are you using? Just quickly tried it in Chrome 39.0.2171.71 m and it works fine.
I use Chrome 39.0.2171.71, the same as yours. When I load the codepen link above and I check out the Javascript console, I should see "27":
$(".dial").knob({
'change' : function (v) { console.log(v); }
});
$('.dial')
.val(27)
.trigger('change');
But nothing is displayed.
I'm having the same issue. I'm using Google Chrome 39.0.2171.71 m too.
I tried both:
$(".dial").knob({
'change' : function (v) { console.log(v); }
});
$('.dial')
.val(27)
.trigger('change');
And
$(".dial").knob({
'release' : function (v) { console.log(v); }
});
$('.dial')
.val(27)
.trigger('release');
Neither worked.
Apologies for reposting. I wanted to change my email address.
I'm having the same issue. I'm using Google Chrome 39.0.2171.71 m too.
I tried both:
$(".dial").knob({
'change' : function (v) { console.log(v); }
});
$('.dial')
.val(27)
.trigger('change');
And
$(".dial").knob({
'release' : function (v) { console.log(v); }
});
$('.dial')
.val(27)
.trigger('release');
Neither worked.
Same issue here.