Skip to content

Instantly share code, notes, and snippets.

@mark47
mark47 / datatables.datetime-flex.js
Last active March 18, 2019 06:18
Plugin for jQuery Datatables sorting of US-style date and time. Requires month, day and year. Time is optional and can be in 12 or 24 hour formats. Properly parses mm/m, dd/d and yyyy/yy.
/**
* DataTables plug-in to handle U.S.-style dates. Requires month day year.
* Time is optional and can be in 12 or 24 hour formats.
* Properly parses mm/m, dd/d and yyyy/yy.
*
* Based on original datetime-us plugin by Kevin Gravier.
*
* @name Flexible US Datetime
* @summary Sort dates and times in US mm/dd/yyyy with optional time.
* @author Mark Stewart
@mark47
mark47 / Equal column height
Created December 23, 2013 19:23
Make equal height columns via adding .col-wrap with overflow:hidden
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>SO equal height columns</title>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.8.3.js'></script>
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.0/css/bootstrap.min.css">
<style type='text/css'>
.col{
margin-bottom: -99999px;
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Styling radios &amp; checkboxes using CSS3</title>
<link rel="stylesheet" media="screen" href="styles.css" >
</head>
<body>
<h1>Styling radios &amp; checkboxes using CSS3</h1>
@mark47
mark47 / highcharts.hover.js
Created December 5, 2012 18:34
Highcharts - hover on container
// Adds subtle hover effect to Highcharts chart where it's contained within a div with class="sparkline"
// Default background in #fff
$(".sparkline").mouseenter(function(){
$(this).find('rect').attr('fill','#F7F9F9');
}).mouseleave(function(){
$(this).find('rect').attr('fill','#fff')
})