remove text from textfield if checkbox is selected
<p>I have 2 radiobuttons (A,B) acting as shipping options and one input textfield for inputting phone numbers. 
After selecting A, I need to show custom help text inside the text area ('phone required'). If button B is selected - there should be no help text.</p>

<p>If A is selected, helptext should be removed after user clicks inside textfield and types the number. 
If any option is selected and the textfield is filled. It should stay this way. </p>

<p>My code works except the help text is not removed if user selects A option and after B option without typing anything.</p>

<pre><code>$(document).ready(function () {
  $('input#edit-quote-option-flatrate-3---0').change(function () {
    if ($('input#edit-quote-option-flatrate-3---0').is(":checked")) {


  $('.default').each(function () {
    var defaultVal = ('tel');
    $(this).focus(function () {
      if ($(this).val() == defaultVal) {
        $(this).removeClass('active').val('');
      }
    })
      .blur(function () {
      if ($(this).val() == '') {
        $(this).addClass('active').val(defaultVal);
      }
    })
      .blur().addClass('active');
  });
    } else {

        $('.default').removeClass('active').val('');

    }
  });
});
</code></pre>

<p>full code is here <a href="http://jsfiddle.net/NKcFs/2/" rel="nofollow">http://jsfiddle.net/NKcFs/2/</a></p>
