SO fiddle

Test Fiddle mainly for SO Questions

by Nick Craver

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/overcast/jquery-ui.css">
<form name="radios" id="myForm">
<div id="buttonSetDiv">
<input type="radio" name="group1" value="posts" id="radio1" checked onchange="valueChanged()"> <label for="radio1">Posts</label>
<input type="radio" name="group1" value="members" onchange="valueChanged()" id="radio2">
<label for="radio2">Members</label>
</div>
</form>

JavaScript

$("#buttonSetDiv").buttonset();