title: jquery in yii: Detecting radiobutton losing check mark (checked state)
body: <p>Given the following code (yes, i know it is perhaps irrelevant in yii, but I added the tag so I update the question with the actual generated html):</p>
  
  <pre><code>&lt;script&gt;
  $(function(){
      $('#widgetId-form input[name="valueType"]').change(function(){
          if ($(this).is(":checked"))
          {
              console.log("habilitando "+$(this).data("class"));
              $("."+$(this).data("class")).prop("disabled", false);
          }
          else
          {
              console.log("deshabilitando "+$(this).data("class"));
              $("."+$(this).data("class")).prop("disabled", true);
          }
      }).change();
  });
  &lt;/script&gt;
  &lt;div id="widgetId-dialog"&gt;
  &lt;form id="widgetId-form" action="/support/test" method="post"&gt;
      &lt;div&gt;
          &lt;input id="valueType-single" value="single" data-class="singleValueField" checked="checked" type="radio" name="valueType" /&gt;
          &lt;label for="single"&gt;Valor simple&lt;/label&gt;
          &lt;input size="6" class="singleValueField" type="text" value="" name="singleValue" id="singleValue" /&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;input id="valueType-range" value="range" data-class="rangeValueField" type="radio" name="valueType" /&gt;
          &lt;label for="range"&gt;Rango (inicio:fin:intervalo)&lt;/label&gt;
          &lt;input size="6" class="rangeValueField" type="text" value="" name="rangeValue_start" id="rangeValue_start" /&gt;:&lt;input size="6" class="rangeValueField" type="text" value="" name="rangeValue_end" id="rangeValue_end" /&gt;:&lt;input size="6" class="rangeValueField" type="text" value="" name="rangeValue_interval" id="rangeValue_interval" /&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It doesn't trigger change() when a radio becomes unchecked. This implies: controls are disabled <strong>only on initialization (.ready())</strong>. change() is not triggered individually by controls losing the checkmark.</p>
  
  <p><strong>Question</strong>: how can I detect when a radio button loses the checkmark?</p>