<html>
<body>
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256- WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
crossorigin="anonymous"></script>
<div id="rates">
<input type="radio" class="r1" name="rate" value="Fixed Rate"> Fixed Rate
<input type="radio" class="r1" name="rate" value="Variable Rate"> Variable Rate
<input type="radio" class="r1" name="rate" value="Multi Rate"> Multi Rate
</div>
<p id="r">ddasd</p>
<script>
$(document).ready(function() {
var r = $('#r')
var res = $('input[name="rate"]')
if (res.checked) {
r.innerHTML = res.val()
}
})
</script>
</body>
</html>
не работает