Skip to content

Instantly share code, notes, and snippets.

bwlng / reveal_content.html
Created Jun 28, 2013
Use a single modal and fill it w/ content from throughout the site.
View reveal_content.html
<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
<meta charset="utf-8">
bwlng / responsive_tables.js
Created Jun 20, 2013
# Responsive Tables # Create a new table from each column in an existing table and use the labels from the old table to label the new table.
View responsive_tables.js
$('table').each(function(table_count) {
var table = $(this); // cache table object
var headers = table.find('thead th').clone(); // Clone so original table stays intact
var labels = table.find('tbody tr td:first-child').clone(); // Clone so original table stays intact
// Number of columns to ignore
var offset_columns = 1;
var group_wrapper_class = 'mobile_table_group';
var group_wrapper_id = group_wrapper_class + '_' + table_count;
var table_wrapper_class = 'mobile_table_wrapper';
var table_wrapper_styles = 'float: left; margin-left: 20px';