jquery add required attribute code example
Example 1: jquery add required
$("input").prop('required',true);
Example 2: change input to required jquery
$('#input').prop('required',true);
Example 3: jquery get custom attribute
var userType = $("input[name=ctrl_CustomerType]:checked").attr('xmlvalue');
alert("xmlvalue is: " + userType);