JSFiddle - React, Tailwind, and code Playground

by ChrisStanyon

HTML

<div class="events">
  <input type="radio" value="0" checked="checked" name="opt_booking">
  <input type="radio" value="1" name="opt_booking">
  <input type="radio" value="2" name="opt_booking">
</div>

JavaScript

$(document).ready(function() {
    $('input[type=radio]', '.events').change(function() {
        processWithValue( $(this).val() );
				processWithRadio( $(this) );
    });
});

function processWithValue( value ) {
	alert( "With Value: " + value );
}

function processWithRadio( radio ) {
	alert( "With Radio: " + radio.val() );
}