JQuery UI Buttonset
by Zakaria Acharki
HTML
<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.20/themes/base/jquery-ui.css">
<div id="myRadio">
<input id="first" type="radio" value="1" name="steps"/><label for="first">First</label>
<input id="second" type="radio" value="2" name="steps"/><label for="second">Second</label>
</div>
JavaScript
$('#myRadio').buttonset();
$.fn.buttonsetIsInitialized = function () {
return this.hasClass('ui-buttonset');
};
if ($("#myRadio").buttonsetIsInitialized())
{
console.log('initialized: refresh');
}else{
console.log('Not initialized');
}