title: Material design lite checkbox check property is not defined
body: <p>I have a checkbox that if checked, will check the other checkbox. I am using material design. The checked property of the material box checkbox in undefined. How do I make the checked property become defined? What am I doing wrong?</p>
  
  <p><a href="http://www.recordspreservation.org/test2.html" rel="nofollow noreferrer">This is the link where the problem happens</a></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>&lt;script&gt;
  $(document).ready(function(){
    $("#exclude_all").change(function(){
      var element_all = document.querySelectorAll('[id="exclude_all"]');
      var elements = document.querySelectorAll('[id^="exclude_dir_"]');
      for(var i=0, n=elements.length; i&lt;n; i++){
        var element = elements[i];
        if($('#exclude_all').is(":checked")) {
          element.MaterialCheckbox.check();
        } else {
          element.MaterialCheckbox.uncheck();
        }
      }
    });
  });
  &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"&gt;
      &lt;link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.grey-light_blue.min.css"&gt;
  &lt;script defer src="https://code.getmdl.io/1.3.0/material.min.js"&gt;&lt;/script&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;ol style="padding-left:37px;list-style:none;font-size:12px;"&gt;
      &lt;li&gt;
          &lt;label id="label_exclude_all" name="label_exclude_all" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="exclude_all" style="margin-left:3px;padding-left:31px;"&gt;
          &lt;input type="checkbox" name="exclude_all" id="exclude_all" class="mdl-checkbox__input" value="Buscar"""&gt;
          &lt;span class="mdl-checkbox__label" style="font-size:12px;color:#757575;"&gt;Excluir tudo&lt;/span&gt;
          &lt;/label&gt;
      &lt;/li&gt;
  
      &lt;li&gt;
          &lt;label name="label_exclude_dir_0" id="label_exclude_dir_0" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="exclude_dir_0" style="margin-left:3px;padding-left:31px;"&gt;
          &lt;input type="checkbox" name="exclude_dir_0" id="exclude_dir_0" class="mdl-checkbox__input" value="Atibaia"&gt;
          &lt;span class="mdl-checkbox__label" style="font-size:12px;color:#757575;"&gt;Atibaia&lt;/span&gt;
          &lt;/label&gt;
      &lt;/li&gt;
  &lt;/ol&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>