Disable radio buttons after set as buttonset()
javascript, jquery, jquery-ui
Solution
$("#test > input:radio").button({disabled:true});
DEMO
Problem
I have 3 radio buttons ``` <div id="test"> <input type="radio" id="time1" name="radio" value="1" /><label for="time1">Test 1</label> <input type="radio" id="time2" name="radio" value="2" /><label for="time2">Test 2</label> <input type="radio" id="time3" name="radio" value="3" /><label for="time3">Test 3</label> </div> ``` in jquery ``` $("#test").buttonset(); ``` After that, I want to disable them with (of course, the disabling are placed in an `if` statement) ``` $("#test input").attr("disabled", true); //or $("#test input").prop("disabled", true); ``` but it not works, the buttons are still enabled.