JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#" id="selector">Test</a><br />
<input type="radio" name="ctrl_CustomerType" id="ctrl_CustomerType_1" xmltag="CustomerType" xmlvalue="existingCustomer" checked="checked"> Yes
    <br />
  <input type="radio" name="ctrl_CustomerType" id="ctrl_CustomerType_2" xmltag="CustomerType" xmlvalue="newCustomer"> No

JavaScript

$("#selector").click(function () {
    function SubmitTracking() {
       var userType = $("input[name=ctrl_CustomerType]:checked", this).attr('xmlvalue');
        alert("xmlvalue is: " + userType);
     }
     SubmitTracking();
});