title: Issue regarding to make a checkbox having a particular value set using Javascript or Jquery
body: <p>I want to set a checkbox having a particular value checked using jquery. Now I am using the following line of code to achieve the goal.</p>
  
  <p>Here it is:</p>
  
  <pre><code>$("input[id=brand_id_][value=" + only_brand_name + "]").prop('checked', true);
  </code></pre>
  
  <p>Where 'brand_id_' is the checkbox id and 'only_brand_name' is a string comes from other part of code.</p>
  
  <p>Now this approach is working fine where the checkbox value is just a simple string without any white spaces and special characters. For example if the checkbox html is as:</p>
  
  <pre><code>&lt;input class="brand_tag" id="brand_id_" name="brand_id[]" type="checkbox" value="ACC"&gt;
  </code></pre>
  
  <p>And the 'only_brnad_name' is 'ACC', then I can set the checkbox checked without having any issue by the given line of jquery code.</p>
  
  <p>But if the checkbox html is as:</p>
  
  <pre><code>&lt;input class="brand_tag" id="brand_id_" name="brand_id[]" type="checkbox" value="(Reputed)China Make"&gt;
  </code></pre>
  
  <p>And if 'only_brand_name' variable is exactly '(Reputed)China Make', then I am unable to set the checkbox 'checked' by the same line of jquery code. It seems a weird type of issue and got stuck here for a long time.</p>
  
  <p>Please help me to figure out this. Thanks in advance!!!</p>