title: Passing a value dynamically through a button
body: <p>The function check a input checkbox depending on it's value.</p>
  
  <p>It was working properly until I tried to pass the value "dynamically" through the button. I'm missing something, but can't see what it is.</p>
  
  <pre><code>function fill(value_id)
  {           
      $('input[type=checkbox][value='value_id']').prop('checked', true);
  }
  
  
  &lt;div class="btn open-modal" data-modal="somemodal" onclick='fill("12-12")'&gt;check&lt;/div&gt;
  </code></pre>
  
  <p>Any explanation on the solution is welcome.</p>