views:

23

answers:

2

say I have a bunch of radio buttons in an html form. How do I find and disable all radio input types with a given name="?" value (where ? can be anything I specify)?

A: 
var name = 'someName';
$('#myForm').find(':radio[name=' + name + ']').attr('disabled', 'disabled');
Matt Ball
A: 

It is simple:

$('input[name="name_here"]').attr('disabled', 'disabled');

Replace name_here with the name of your radio buttons.

Sarfraz