title: disabling checkbox using jQuery
body: <p>I am disabling the ID checkbox using following jquery</p>
  <h1>jQuery</h1>
  <pre><code>$('.ColVis_collection button').first().find('input').attr(&quot;disabled&quot;, true);
  </code></pre>
  <h1>html</h1>
  <p>This code is inside another button, which when clicked gets activated like a dropdown.</p>
  <pre><code>&lt;div class=&quot;ColVis_collection TableTools_collection&quot; style=&quot;display: block; position: absolute; opacity: 1; top: 102px; left: 274px; width: 449px;&quot;&gt;
      &lt;button class=&quot;ColVis_Button TableTools_Button&quot; style=&quot;width: 449px;&quot;&gt;
          &lt;span&gt;
              &lt;span class=&quot;ColVis_radio&quot;&gt;
                  &lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot;&gt;
              &lt;/span&gt;
              &lt;span class=&quot;ColVis_title&quot;&gt;
                  &lt;span&gt;
                      id
                  &lt;/span&gt;
              &lt;/span&gt;
          &lt;/span&gt;
      &lt;/button&gt;
      &lt;button class=&quot;ColVis_Button TableTools_Button&quot; style=&quot;width: 449px;&quot;&gt;
          &lt;span&gt;
              &lt;span class=&quot;ColVis_radio&quot;&gt;
                  &lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot;&gt;
              &lt;/span&gt;
              &lt;span class=&quot;ColVis_title&quot;&gt;
                  &lt;span&gt;
                      name
                  &lt;/span&gt;
              &lt;/span&gt;
          &lt;/span&gt;
      &lt;/button&gt;
      .
      .
      .
  &lt;/div&gt;
  </code></pre>
  <p>The first button with span id gets disabled using the jquery and blurred showing that it is disabled but it can be clicked i.e. checked/unchecked. Am I missing something?</p>
  <h1>Edit:</h1>
  <p>I am using jQuery datatables colvis feature, which lets you hide/unhide the table columns</p>
  <p>As you can see in this image, the checkbox seems disabled but can be checked/uncheked</p>
  <p><img src="https://i.stack.imgur.com/xfgW4.png" alt="Image" /></p>