title: Make checkbox value checked with jQuery or JavaScript
body: <p>I am experiencing trouble as I want to make checkbox value checked when site loads and the visitor can uncheck it. id field is dynamic inside input so I need to check based on name and value I suppose. </p>
  
  <p>I used jQuery to make it checked, but nothing happens</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($) {    
    $("input.myclass[name='test-case'][value='yes']").prop("checked", true);
  });</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;input type="checkbox" name="test-case[]" id="cbopt-AAljenwo" value="yes"&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Not sure if this is correct value of marking input as checked. User also can uncheck box if he doesn't like the option. 
  Any help appreciated.</p>