Skip to content

Instantly share code, notes, and snippets.

View MichaelKaeser's full-sized avatar

MichaelKaeser

View GitHub Profile
@robhadfield
robhadfield / Detect touch device
Created August 8, 2012 13:11
is_touch_device
function is_touch_device() {
try {
document.createEvent("TouchEvent");
return true;
} catch (e) {
return false;
}
}
if(is_touch_device()) {
@leemeichin
leemeichin / README.md
Created April 12, 2012 12:02
Modulo Liquid filter for Jekyll

Modulo Liquid filter for Jekyll

Got nested columns in your grid-based Jekyll site?

Wondered why you didn't have a way to calculate the modulo inside your posts loop to open and close your 'rows' containing those nested columns?

Add this filter to your _plugins directory, and use it like so:

{{ x | mod:y }}