title: How to change value of input on click?
body: <p>I load content via ajax and want to change value of each checkbox if click of them. I try</p>
  
  <pre><code>function calculate(){
      if($('input[type=checkbox][checked]')) {
          $(this).attr({ 
              value: 1
          });
      } else {
          $(this).attr({ 
              value: 0
          });
      }
      calculatebbb();
  }
  </code></pre>
  
  <p>and add to each input:</p>
  
  <pre><code>&lt;input type="checkbox" name="a003" value="230073" onclick="calculate()"&gt;
  </code></pre>
  
  <p>but it doesn't check this elemnt, it chcked all elements.</p>