Loop Change Radios
HTML
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<input type="radio" id="rad1" value="0" checked />
<div id="stat">0</div>
JavaScript
var timeout;
function bloop() {
// lets say this is the ajax
if(!$("#rad1").prop("checked")){
$("#rad1").prop("checked", true).val("1");
} else {
$("#rad1").prop("checked", false).val("0");
}
$("#stat").text($("#rad1").val());
}
timeout = setInterval(function(){ bloop(); }, 2000);