JSFiddle - React, Tailwind, and code Playground
by andrewwhitaker
HTML
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.23/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.23/themes/black-tie/jquery-ui.css">
<div id="radio">
<input type="radio" id="radio1" name="radio" value='1' /><label for="radio1">Choice 1</label>
<input type="radio" id="radio2" name="radio" value='2' checked="checked" /><label for="radio2">Choice 2</label>
<input type="radio" id="radio3" name="radio" value='3' /><label for="radio3">Choice 3</label>
</div>
</form>
JavaScript
$(function () {
$("#radio").buttonset();
$("input[name='radio']").on("change", function () {
alert(this.value);
});
});