title: .tableExport is not a function
body: <p>still me with the same deal..</p>
  
  <p>So i'll explain it quick. I've all includes in my page so thats not it.</p>
  
  <p>I'm working on visual studio.</p>
  
  <p>I've created a table that i want to export in pdf or anything else. And so i'm using this :</p>
  
  <p><a href="https://github.com/hhurz/tableExport.jquery.plugin" rel="nofollow">https://github.com/hhurz/tableExport.jquery.plugin</a></p>
  
  <p>This works very well if in my code i put it like this :</p>
  
  <pre><code>                $('table').tableExport({ type: 'pdf', jspdf: { orientation: 'l', format: 'a3', margins: { left: 10, right: 10, top: 20, bottom: 20 }, autotable: { styles: { fillColor: 'inherit', textColor: 'inherit' }, tableWidth: 'auto' } } });
  </code></pre>
  
  <p>Obviously surrounded by  balise.</p>
  
  <p>But anytime i want to put this in a button, it doesn't work !! Chrome console keep saying me this : .tableExport is not a function</p>
  
  <p>How can it be possible ? It works well when i just call the script !</p>
  
  <p>This is my event and my button (please if someone has something to help that would be really great !) :</p>
  
  <pre><code>$(document).ready(function () {
                  $('#downloadPDF').on('click', function (e) {
                      console.log("test");
                      e.preventDefault();
                      $('table').tableExport({ type: 'csv' });
  
                      $('table').tableExport({
                          type: 'pdf',
                          jspdf: {
                              orientation: 'l',
                              format: 'a3',
                              margins: {
                                  left: 10,
                                  right: 10,
                                  top: 20,
                                  bottom: 20
                              },
                              autotable: {
                                  styles: {
                                      fillColor: 'inherit',
                                      textColor: 'inherit'
                                  },
                                  tableWidth: 'auto'
                              }
                          }
                      });
                  });
              });
  
              &lt;button type="button" id="downloadPDF" class="btn btn-default"&gt;Default&lt;/button&gt;*@
  </code></pre>
  
  <p>Thanks guys.</p>
  
  <p>
          </p>
  
  <pre><code>        &lt;table id="table" class="table table-hover "&gt;
  
              &lt;tbody&gt;             
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt; &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                  &lt;/tr&gt;
  
              &lt;/tbody&gt;
  
  
  
  
              &lt;tr class="info"&gt;
                  &lt;td&gt;&lt;b&gt;&lt;/b&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;br /&gt;&lt;br /&gt;
                           &lt;br /&gt;&lt;br /&gt;
                          &lt;br /&gt;&lt;br /&gt;
               &lt;/tbody&gt;           
                      &lt;/td&gt;
                      &lt;td&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt; &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt; &lt;/td&gt;
                  &lt;/tr&gt;
  
              &lt;/tbody&gt;
  
          &lt;/table&gt;
  
      &lt;/div&gt;
  
      @* Bouton extraction *@
  
          &lt;script&gt;
              $(document).ready(function () {
  
              });
          &lt;/script&gt;
          &lt;script&gt;
  
          $('#downloadPDF').on('click', function (e) {
                      console.log("test");
                      e.preventDefault();
                      $('table').tableExport({
                          type: 'pdf',
                          jspdf: {
                              orientation: 'l',
                              format: 'a3',
                              margins: {
                                  left: 10,
                                  right: 10,
                                  top: 20,
                                  bottom: 20
                              },
                              autotable: {
                                  styles: {
                                      fillColor: 'inherit',
                                      textColor: 'inherit'
                                  },
                                  tableWidth: 'auto'
                              }
                          }
                      });
                  });
          &lt;/script&gt;
  
  
          &lt;button type="button" id="downloadPDF" class="btn btn-default"&gt;Default&lt;/button&gt;*@
  </code></pre>
  
  <p></p>
  
  <p></p>