title: Jquery change input radio button state
body: <p>I am tryign to get an alarm when user activates or deactivates a radiobutton with name <code>con1</code></p>
  
  <p>However is not working, my current code is</p>
  
  <h1>html</h1>
  
  <pre><code>&lt;div class="form-field-box even" id="con1_field_box"&gt;
      &lt;div class="form-display-as-box" id="con1_display_as_box"&gt;con1:&lt;/div&gt;
      &lt;div class="form-input-box" id="con1_input_box"&gt;
          &lt;div class="pretty-radio-buttons"&gt;
              &lt;label&gt;
                  &lt;div id="uniform-field-con1-true" class="radio"&gt;    &lt;span&gt;
                          &lt;input id="field-con1-true" class="radio-uniform" name="con1" value="1" type="radio"&gt;
                      &lt;/span&gt;
  
                  &lt;/div&gt;active&lt;/label&gt;
              &lt;label&gt;
                  &lt;div id="uniform-field-con1-false" class="radio"&gt;   &lt;span class="checked"&gt;
                          &lt;input id="field-con1-false" class="radio-uniform" name="con1" value="0" checked="checked" type="radio"&gt;
                      &lt;/span&gt;
  
                  &lt;/div&gt;inactive&lt;/label&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="clear"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <h1>js</h1>
  
  <pre><code>$(".con1").change(function () {
      if ($("#con1").attr("checked")) {
          alert("aactive");
      } else {
          alert("inactive");
      }
  });
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>please take a look at <a href="https://jsfiddle.net/qkezx010/" rel="nofollow">current fiddle</a> </p>