<!DOCTYPE html>
<
html
>
<
head
>
<
link
href
=
rel
=
'stylesheet'
>
</
head
>
<
body
>
<
center
>
<
h1
style
=
"color:green"
>GeeksforGeeks</
h1
>
<
h2
>disabled option true or false</
h2
>
<
div
class
=
"my_games_control_group"
>
<
label
for
=
"radio_1"
>Men</
label
>
<
input
type
=
"radio"
name
=
"type"
id
=
"radio_1"
>
<
label
for
=
"radio_2"
>Women</
label
>
<
input
type
=
"radio"
name
=
"type"
id
=
"radio_2"
>
<
select
>
<
option
>Cricket</
option
>
<
option
>Hockey</
option
>
<
option
>Tennis</
option
>
<
option
>Football</
option
>
</
select
>
<
label
for
=
"official"
>Official</
label
>
<
input
type
=
"checkbox"
name
=
"official"
id
=
"official"
>
<
button
id
=
"apply"
>Apply</
button
>
</
div
>
<
br
><
br
><
br
>
<
div
id
=
display
>Display</
div
>
<
br
> Set the Disabled option
<
div
class
=
'radio_selection'
>
<
label
for
=
sel_radio_1
>True</
label
>
<
input
type
=
'radio'
name
=
'r_disabled'
id
=
'sel_radio_1'
value
=
true
>
<
label
for
=
sel_radio_2
>False</
label
>
<
input
type
=
'radio'
name
=
'r_disabled'
id
=
'sel_radio_2'
value
=
false
checked>
</
div
>
<
script
src
=
</
script
>
<
script
src
=
</
script
>
<
script
>
$(document).ready(function() {
$(".my_games_control_group, .radio_selection").controlgroup()
$("input:radio[name=r_disabled]").click(function() {
var selection = ($(this).val() == 'true');
$(".my_games_control_group").controlgroup(
"option", "disabled", selection);
$('#display').html(
" $( \".my_games_control_group\" ).controlgroup( \"option\", \"disabled\", "
+ selection + ")");
})
})
</
script
>
</
center
>
</
body
>
</
html
>