Removing disabled from checkbox : <p>I have 2 checkboxes styled as toggle buttons.
The 2nd checkbox is by default <code>disabled</code>.
When the 1st checkbox is to ja I would like the 2nd checkbox to have <code>disabled</code> removed.</p>

<p>I have tried this with 2 codes but I did not succeed.
In my console I see no errors.</p>

<p><a href="https://i.stack.imgur.com/k39FT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k39FT.jpg" alt=""></a></p>

<pre><code>&lt;div class="checkbox"&gt;
  &lt;label&gt;
    &lt;input type="checkbox" id="email_user" name="email_user" data-toggle="toggle" data-size="small" data-on="Ja" data-off="Nee" onclick="remove_disabled()"&gt;
    Verstuur melding ook per e-mail naar collega.
  &lt;/label&gt;
&lt;/div&gt;
&lt;div class="checkbox"&gt;
  &lt;label&gt;
    &lt;input type="checkbox" id="email_relatie" name="email_relatie" data-toggle="toggle" data-size="small" data-on="Ja" data-off="Nee" disabled&gt;
    Verstuur een kopie van deze melding naar de relatie.
  &lt;/label&gt;
&lt;/div&gt;
</code></pre>

<p><strong>Option 1</strong></p>

<pre><code>&lt;script type="text/javascript"&gt;
function remove_disabled() {
    document.getElementById('email_relatie').disabled = false;
}
&lt;/script&gt;
</code></pre>

<p><strong>Option 2</strong></p>

<pre><code>&lt;script type="text/javascript"&gt;
function remove_disabled() {
    document.getElementById('email_relatie').removeAttr('disabled')
}
&lt;/script&gt;
</code></pre>
