using jquery to disable a series of radio buttons on demand.
- by holden
I'm trying to accomplish something similar to Wikipedia's History history page, dynamically disabling radio buttons in a series.
Ie... if #4 in group two is selected, then 1-4 of group one are disabled, etc.
I know how to disable them individually or as a group, but I'm not sure how to do it in a series of say 1-4:
Individually:
$("#version_history input[id^=versions_2_3]:radio").attr('disabled',true);
or group:
$("#version_history input[id^=versions_2]:radio").attr('disabled',true);
The inputs are named versions_1_X and versions_2_X, X being some number. 1..2..3.. etc.