title: jQuery Mobile: refresh radio button selection periodically
body: <p>I'm having trouble with refreshing a group of radio buttons, I hope someone could help.. The problem is how to display the newest selection(which radio is selected), so when one user select A, how could another user see radio button '#rA' is selected on his own device.</p>
  
  <p>here is the markup: the div that displays the selected radio's value, and the 3 radio buttons.</p>
  
  <pre><code>&lt;div id="radiostate"&gt;&lt;?php echo $value;?&gt;&lt;/div&gt;
  &lt;div id="test" &gt;     
      &lt;input type="radio" name="r" id="rB" value="B" data-theme="c" &gt;&lt;label for="rB"&gt;&amp;nbsp;&lt;/label&gt;  
      &lt;input type="radio" name="r" id="rA" value="A" data-theme="a" &gt;&lt;label for="rA"&gt;&amp;nbsp;&lt;/label&gt;
      &lt;input type="radio" name="r" id="rC" value="C" data-theme="f" &gt;&lt;label for="rC"&gt;&amp;nbsp;&lt;/label&gt;
  &lt;/div&gt; 
  </code></pre>
  
  <p>the code to refresh div "#radiostate" every 10 seconds, and get radio button checked based on $value:</p>
  
  <pre><code> var refresh = setInterval(function(){
     $('#radiostate').load('getstate.php');
     var dbvalue = $('#radiostate').text();
     $('input[type="radio"][value="' + dbvalue +'"]').attr('checked', true).checkboxradio("refresh");
   }, 10000); 
  </code></pre>
  
  <p>this works fine to display the selected radio value (A, B, or C) in "#radiostate", but the radio buttons won't change... Any suggestions? thanks in advance!</p>
  
  <p><strong>EDIT1</strong> </p>
  
  <p>I've also tried to put the radio buttons in another PHP(radio.php), and then load it every 10 seconds, but this totally messed up the style. 
  If i don't include jquery.js and jquerymobile.js in radio.php, the radio buttons lose style: </p>
  
  <p><img src="https://i.stack.imgur.com/QyYfm.jpg" alt="no jquery"></p>
  
  <p>if I include jquery.js and jquerymobie.js, the index.php would looks like this, and the layer increases after each loading of radio.php:</p>
  
  <p><img src="https://i.stack.imgur.com/ZMLmA.jpg" alt="include jquery"></p>