This version is old school.
Please find jQuery plugins on npm.
jQuery rt Responsive Tables
This is a jQuery plugin for making tables responsive dynamically. The plugin dynamically detects when the table no longer can fit in its container and then displays it vertically.