Skip to content

Instantly share code, notes, and snippets.

@bwlng
bwlng / reveal_content.html
Created June 28, 2013 20:59
Use a single modal and fill it w/ content from throughout the site.
<!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]-->
<head>
<meta charset="utf-8">
<title>Title</title>
</head>
<body>
@bwlng
bwlng / responsive_tables.js
Created June 20, 2013 23:00
# 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.
$('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';