<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet">
<div class="container mt-4">
<h3>Bootstrap Radio Button Checked Event</h3>
<input class="form-check-input" type="radio" name="state" id="alabama" value="Alabama">
<label class="form-check-label" for="alabama">
<input class="form-check-input" type="radio" name="state" id="alaska" value="Alaska">
<label class="form-check-label" for="alaska">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js"></script>
$(document).ready(function () {
$('.form-check-input').change(function () {
if ($(this).is(':checked')) {
var stateName = $(this).val();
alert('Selected state: ' + stateName);
// Perform actions with the selected state name