JSFiddle - React, Tailwind, and code Playground
by Robert N.
HTML
<div id="block_attr_sel_3">
<div class="check_attr">
<input type="radio" name="jshop_attr_id[3]" id="jshop_attr_id37" value="7" onclick="setAttrValue('3', this.value);">
<label class="radio_attr_label" for="jshop_attr_id37">Zero 0мг/мл</label>
</div>
<div class="check_attr">
<input type="radio" name="jshop_attr_id[3]" id="jshop_attr_id38" value="8" onclick="setAttrValue('3', this.value);">
<label class="radio_attr_label" for="jshop_attr_id38">Zero 0мг/мл</label>
</div>
</div>
<hr/>
<div id="block_attr_sel_5">
<div class="check_attr">
<input type="radio" name="jshop_attr_id[5]" id="jshop_attr_id55" value="7" onclick="setAttrValue('3', this.value);">
<label class="radio_attr_label" for="jshop_attr_id55">белый</label>
</div>
<div class="check_attr">
<input type="radio" name="jshop_attr_id[5]" id="jshop_attr_id34" value="8" onclick="setAttrValue('3', this.value);">
<label class="radio_attr_label" for="jshop_attr_id34">чёрный</label>
</div>
</div>
CSS
.checkkkkk{background:red;}
JavaScript
jQuery(document).ready(function($){
$('input[id^=jshop_attr_id]').click(function(){
$(this).parent().siblings().removeClass('checkkkkk');
$(this).parent().addClass('checkkkkk');
})
})