{{ require_js(get_asset_url('../js/stacktable.js')) }} // https://s3-us-west-2.amazonaws.com/s.cdpn.io/7635/stacktable.js {% require_js %} <script> $('table[data-stack]').stacktable({myClass:'stacked stacked--vertical'}); </script> {% end_require_js %} @media(min-width: 768px) { .stacked--vertical { display:none !important } } @media(max-width: 767px) { table[data-stack] { display:none !important } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter