I am new to jQuery and thought that I would use my own set of buttons instead of some radio buttons in my application. Documentation here: http://jqueryui.com/demos/button/#radio
How to add an event handler when a set of buttons changes a value?
Here is the code snippet I tried:
$('input.tod_quant').change(function() { alert('TEST'); });
And then further in the HTML:
<span id="tod_quant" class="buttonset"> <input type="radio" id="tod_quant5" name="tod_quant" value="5" /><label for="tod_quant5">5-Minute</label> <input type="radio" id="tod_quant60" name="tod_quant" checked="checked" value="60" /><label for="tod_quant60">60-Minute</label> </span>
The change event never fires. Is there an event of change? How can i do this? Also, is there any documentation with an example? http://jqueryui.com there are many examples, and not one of them that I can find shows what events are triggered. I believe that my ignorance of jQuery does not completely help the situation.
Any help would be greatly appreciated. Thanks.
jquery jquery-ui jquery-ui-button
Brad
source share