Вы должны отредактировать это:
("input[name='my_radio']");
К этому:
$("input[name='my_radio']");
И если у вас есть несколько радиовходов, то вы также должны внести эти изменения:
my_radio.each(function(){
$(this).on('change', function(){
if($(this).is(':checked')){
console.log($(this).val());
}
});
});
Пример:
var my_radio = $('input[type="radio"]');
my_radio.each(function(){
$(this).on('change', function(){
if($(this).is(':checked')){
$('span').text($(this).val());
}
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<form>
<input type="radio" name="1" value="1" />
<input type="radio" name="1" value="2" />
<input type="radio" name="1" value="3" />
<input type="radio" name="1" value="4" />
</form>
<h1>You selected</h1>
<span></span>