title: Change checkbox value on click
body: <p>I have checkbox nested in html elements. I want to target it and manipulates its value when somebody check it. I am trying this</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>jQuery(document).ready(function() {
    jQuery('#my-form .checkbox-value input').click(function() {
      jQuery('#my-form .checkbox-value input[value=yes]').prop('checked', jQuery(this).prop('checked'));
      jQuery('#my-form .checkbox-value input[value=no]').prop('checked', jQuery(this).prop('checked') === false);
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;form id="my-form"&gt;
    &lt;div id="checkbox" class="checkbox-value"&gt;
      &lt;label class="form-label forms-label-hide" for="checkbox_item"&gt;Checkboxes&lt;/label&gt;
      &lt;ul id="checkbox_item"&gt;
        &lt;li class="choice-1 depth-1"&gt;
          &lt;input type="checkbox" id="checkbox_item_1" name="my-checkbox" value="Want to change this value on dom" /&gt;
          &lt;label for="checkbox_item_1"&gt;Yes, let me know when you have new blogs to share.&lt;/label&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  
    &lt;div class=""&gt;
      &lt;button type="submit"&gt;Submit&lt;/button&gt;
    &lt;/div&gt;
  
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>When someone click on label or checkbox it should changes values to yes if it is checked and no when it is not checked.</p>