title: JavaScript Dragscroll Not Working With HTML Table
body: <p>I'm trying to create a table with a fixed header and left column that I can freely scroll around. I want to be able to implement the scroll using the drag to scroll method with the client mouse. Whenever I try to implement the dragscroll function, I cannot get it to work. How would I implement the dragscroll correctly into my created table?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="dragscroll"&gt;
        &lt;script&gt;
          var sysDate = new Date();
          var sysDay = new Date();
          var sysMonth = new Date();
          var dayCount = sysDay.getDay();
          var weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
          var emps = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
                      "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
          var drawTable = '&lt;table&gt;';
          drawTable += "&lt;thead&gt;";
          drawTable += "&lt;tr&gt;";
          drawTable += "&lt;th&gt;&lt;/th&gt;";
          for (let i = sysDate.getDate() - 7; i &lt;= sysDate.getDate() + 7; i++) {
            drawTable += "&lt;th&gt;" + weekdays[sysDay.getDay()] + " " + sysMonth.getMonth() + "/" + i + "&lt;/th&gt;";
          }
          drawTable += "&lt;/tr&gt;";
          drawTable += "&lt;/thead&gt;";
          drawTable += "&lt;tbody&gt;";
          for (let i = 0; i &lt; emps.length; i++) {
            drawTable += '&lt;tr&gt;';
            drawTable += "&lt;td&gt;Employee " + emps[i] + "&lt;/td&gt;";
            for (let j = sysDate.getDate() - 7; j &lt;= sysDate.getDate() + 7; j++) {
              drawTable += "&lt;td&gt;&lt;/td&gt;";
            }
            drawTable += '&lt;/tr&gt;';
          }
          drawTable += "&lt;/tbody&gt;";
          drawTable += "&lt;/table&gt;";
          document.write(drawTable);
        &lt;/script&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Dragscroll JS: <a href="https://cdn.rawgit.com/asvd/dragscroll/master/dragscroll.js" rel="nofollow noreferrer">https://cdn.rawgit.com/asvd/dragscroll/master/dragscroll.js</a></p>
  
  <p>JSFiddle: <a href="https://jsfiddle.net/a7esqent/#&amp;togetherjs=wPxuoQcPGr" rel="nofollow noreferrer">https://jsfiddle.net/a7esqent/#&amp;togetherjs=wPxuoQcPGr</a></p>
  
  <p>Thank you for your time!</p>