Skip to content

Instantly share code, notes, and snippets.

@csessig86
csessig86 / gist:5017284
Created February 22, 2013 23:02
Before, after photos: Full code for snow project
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--[if lt IE 7 ]><html class="ie6"> <![endif]-->
<!--[if IE 7 ]><html class="ie7"> <![endif]-->
<!--[if IE 8 ]><html class="ie8"> <![endif]-->
<!--[if IE 9 ]><html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html class=""><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Before/after photos: Blizzard hits eastern Iowa</title>
@csessig86
csessig86 / gist:5017296
Created February 22, 2013 23:05
Before, after photos: Page shell
<!DOCTYPE html>
<html>
<head>
<title>Before/after demo</title>
</head>
<body>
</body>
</html>
@csessig86
csessig86 / gist:5017309
Created February 22, 2013 23:09
Before, after photos: CSS
<style>
.trackMe img.beforeafterphotos {
top:0 !important;
left:0 !important;
position:absolute;
margin:0 0 15px 0 !important;
}
</style>
@csessig86
csessig86 / gist:5017312
Created February 22, 2013 23:10
Before, after photos: Full demo code
<!DOCTYPE html>
<html>
<head>
<title>Before/after demo</title>
<style>
.trackMe img.beforeafterphotos {
top:0 !important;
left:0 !important;
position:absolute;
@csessig86
csessig86 / gist:5017314
Created February 22, 2013 23:10
Before, after photos: DIV code
<div style="position:relative; width:600px; height:460px;" class="trackMe">
<img src="http://wcfcourier.com/app/special/beforeafter/beforeafter05b.jpg" class="beforeafterphotos" />
<img src="http://wcfcourier.com/app/special/beforeafter/beforeafter05a.jpg" class="beforeafterphotos" />
</div>
@csessig86
csessig86 / gist:5138901
Last active December 14, 2015 19:48
DataSet > DataTables part 1
// DataTables currency
// Use to sort the table via currency
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"currency-pre": function ( a ) {
a = (a==="-") ? 0 : a.replace( /[^\d\-\.]/g, "" );
return parseFloat( a );
},
"currency-asc": function ( a, b ) {
return a - b;
@csessig86
csessig86 / gist:5138915
Created March 11, 2013 23:32
DataSet > DataTables part 2
// Where we'll put the data
var newDataSet = [];
// Our column headers
// Change these to fit your table
var tableColumnSet = [
{ "sTitle": "Employee" },
{ "sTitle": "Department" },
{ "sTitle": "Total FY12 Salary", "sType": "currency" },
{ "sTitle": "Gender", "sClass": "center" },
@csessig86
csessig86 / gist:5138926
Created March 11, 2013 23:35
DataSet > DataTables part 3
// Our DataTable information
// Don't need to change anything here
// Unless you want to customize the table format
function showInfo() {
$('#table_div').html( '<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="table"></table>' );
// Push the data to the table
$('#table').dataTable( {
"bProcessing":true,
"sPaginationType": "bootstrap",
@csessig86
csessig86 / gist:5138959
Created March 11, 2013 23:40
DataSet > DataTables part 4
// Load up the CSV using Miso.Dataset
$(document).ready( function() {
// Change URL to the right path for your CSV
var ds = new Miso.Dataset({
url : 'csvs/salary_book_clean.csv',
delimiter : ','
});
// Run this after we load our CSV
ds.fetch({ success : function() {
@csessig86
csessig86 / gist:5528988
Created May 6, 2013 23:05
Responsive maps blog 1
/* Body */
body {
padding-left: 0px;
padding-right: 0px;
margin: 0;
height: 100%;
}
html {
height: 100%;