Boostrap Collapse With a Custom CSS Checkbox
<p>Hey I have an accordion which is a label and checkbox.
The problem is that the main checkbox in the headline: "I have a driver license", can't be checked or unchecked.
All the other checkboxes works fine expect the main checkbox which is the accordion headline.</p>

<p>This issue doesn't appear when using native checkbox, only when using custom css checkbox.</p>

<p>I need a solution to this problem, I have struggle with it for hours.
Any solution (expect turning this into a simple checkbox) is welcome :).</p>

<p>Here a jsfiddle to the code:</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>$('.collapse').collapse();</code></pre>
<pre class="snippet-code-css lang-css prettyprint-override"><code>.ui-checkbox {
  display: none;
}
.ui-checkbox + label {
  position: relative;
  padding-left: 25px;
  display: inline-block;
  font-size: 14px;
}
.ui-checkbox + label:before {
  background-color: #fff;
  /**#fff*/
  border: 1px solid #1279C6;
  padding: 9px;
  border-radius: 3px;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  content: "";
}
.ui-checkbox:checked + label:before {
  border: 1px solid #1279C6;
  color: #99a1a7;
}
.ui-checkbox:checked + label:after {
  content: '\2714';
  font-size: 14px;
  position: absolute;
  top: 1px;
  left: 4px;
  color: #1279C6;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" /&gt;
&lt;script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"&gt;&lt;/script&gt;

&lt;div class="panel-group driving-license-settings" id="accordion"&gt;
  &lt;div class="panel panel-default"&gt;
    &lt;div class="panel-heading"&gt;
      &lt;h4 class="panel-title"&gt;
     &lt;a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"&gt;
       &lt;input type="checkbox" class="ui-checkbox" id="chk1" value=""&gt; 
          &lt;label  for="chk1"&gt;I have Driver License&lt;/label&gt;
  &lt;/a&gt;
   &lt;/h4&gt;
    &lt;/div&gt;
    &lt;div id="collapseOne" class="panel-collapse collapse in"&gt;
      &lt;div class="panel-body"&gt;
        &lt;div class="driving-license-kind"&gt;
          &lt;div class="checkbox"&gt;
            &lt;input type="checkbox" class="ui-checkbox" id="chk2" value=""&gt;
            &lt;label for="chk2"&gt;A&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="checkbox"&gt;
            &lt;input type="checkbox" class="ui-checkbox" id="chk3" value=""&gt;
            &lt;label for="chk3"&gt;B&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="checkbox"&gt;
            &lt;input type="checkbox" class="ui-checkbox" id="chk4" value=""&gt;
            &lt;label for="chk4"&gt;C&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="checkbox"&gt;
            &lt;input type="checkbox" class="ui-checkbox" id="chk5" value=""&gt;
            &lt;label for="chk5"&gt;D&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="checkbox"&gt;
            &lt;input type="checkbox" class="ui-checkbox" id="chk6" value=""&gt;
            &lt;label for="chk6"&gt;E&lt;/label&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>