I have a form that calculates an estimate. I want the sales person to be able to mark up the estimate, by a percentage using jquery-knob. I have it all working, but I want to have the value change on release of the knob, or change for that matter, either one, so they don't have to hit the calculate button again. I haven't been able to get query-knob to fire anything on release or change, I'm sure I am missing something very simple here, but it just escapes me.
Here is the input element itself:
<input type="number" name="adjust" id="adjust" value="100" data-min="75" data-max="125" data-step="2" class="dial notstored adjuster" data-width="150" data-cursor=true data-thickness=.4 data-fgColor="#1C5C67" data-inputColor="black" data-bgColor="#FBFBFB"/>
Here is are some of the calls I have tried, the first one not following the knob readme at all (edit: I have also tried wrapping these in document ready):
<script>
$("#adjust").change(function () {
alert('monkey')
});
</script>
And here is one using the knob documentation:
<script>
$("#adjust").knob({
'release' : function () { alert('monkey'); }
});
</script>
I've tried many other various incarnations of theses, but it would just make this post longer than it already is. Thanks for any guidance.
EDIT: solved. When you have multiple of these in a form and you call them based on class, but one should fire something on release, make sure it is called by ID and does not have the class.