title: jQuery focus textfield check radio button
body: <p>I am busy with a little form but i am stuck now.</p>
  
  <p>I have this little code:</p>
  
  <pre><code>jQuery('#textinput input').click(function() {
      if (jQuery(this).is(':focus')) {
          jQuery('input:radio[name=open_amount]').attr('checked',true);
      } else { 
          jQuery('input:radio[name=open_amount]').attr('checked',false);
      }
   }); 
  </code></pre>
  
  <p>This is working half. When i type something in the input text the radiobutton will be checked but if i change my mind and i check some other radiobutton the check is not removed in the HTML code. </p>
  
  <p>And when i type in a value, change my mind and check a other radio button and go back to the input text the radio button won't change automatically then.</p>
  
  <p>So what do i wrong?</p>