JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/ui-lightness/jquery-ui.css">
<div><input id='one' name='myradio' type='radio' />radio 1</div>

<div><input id='two' name='myradio' type='radio' />radio 2</div>
<br><br>
<div><input id='one' name='anotherradio' type='radio' />radio 1</div>

<div><input id='two' name='anotherradio' type='radio' />radio 2</div>

CSS

.style1 {
    background: yellow;
}

JavaScript

$(document).ready(function () {
    $(':radio').change(function () {
        $(':radio[name=' + this.name + ']').parent().removeClass('style1');
        $(this).parent().addClass('style1');
    });
});