I have a question on how to use Jquery UI.
This is my first time that I try Jquery UI and I could add a button by using Jquery UI button.
Now, I'd like to add events when the radio is switched on and off.
For example, when the radiobox is turned on, an alert window shows up saying "on" and when the radiobox is turned off, an alert window shows up saying "off".
How could I add events to Jquery UI button?
Thanks in advance !!
output

javascript
$(function(){
$('input[type=radio]').button();
$('.set').buttonset();
})
html
<div class="set">
<input type="radio" name="radio" id="radio1"><label for="radio1" />ON</label>
<input type="radio" name="radio" id="radio2"><label for="radio2" />OFF</label>
</div>