JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<div id="test1">
<input type="radio" id="component_0_test_0" name="component_test_0" value="0" checked="checked" />
<label for="component_0_test_0">0</label>
<input type="radio" id="component_1_test_0" name="component_test_0" value="1" />
<label for="component_1_test_0">1</label>
<input type="radio" id="component_2_test_0" name="component_test_0" value="2" />
<label for="component_2_test_0">2</label>
</div>
<div id="test2">
<input type="radio" id="component_0_test_1" name="component_test_1" value="0" checked="checked" />
<label for="component_0_test_1">0</label>
<input type="radio" id="component_1_test_1" name="component_test_1" value="1" />
<label for="component_1_test_1">1</label>
<input type="radio" id="component_2_test_1" name="component_test_1" value="2" />
<label for="component_2_test_1">2</label>
</div>
JavaScript
jQuery(function () {
$('#test1').buttonset();
$('#test2').buttonset();
// Once an component button is clicked
$('div[id*="test"] input').click(function () {
// Set all other buttonsets to the same value
var button_id = $(this).attr('id');
var to = button_id.lastIndexOf('_', button_id.lastIndexOf('_') - 1) + 1;
var track_number = button_id.substring(0, to);
// Change all check buttons
$('div[id*="test"] input[id*="' + track_number + '"]').each(function () {
$(this).attr('checked', true);
$(this).button('refresh');
})
})
})