title: Uncaught TypeError: Cannot read property 'className' of undefined
body: <p>The following error is being thrown in Google Chrome's developers tools:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'className' of undefined </p>
  </blockquote>
  
  <p>The code on which the error is being thrown is: </p>
  
  <pre><code>var oTable = $('#resultstable').dataTable({
                              "bAutoWidth" : true,
                              "iDisplayLength" : 10,
                              "bFilter" : false,
                              "bLengthChange" : false
                          });
  </code></pre>
  
  <p>resultstable is the id of a table in the html:</p>
  
  <pre><code>&lt;table cellpadding="0" cellspacing="0" border="0" id="resultstable"
                      name="resultstable" class="display datatable"&gt;
  </code></pre>
  
  <p>The weird thing is that after the table tag there is an if statement. The table runs perfectly fine and the CSS shows up correctly when the program is sent into the else <code>if{}</code> section, but it throws the above error and no CSS is applied when it is in the <code>if{}</code> section.</p>
  
  <p>Help please! </p>