Skip to content

Instantly share code, notes, and snippets.

View YannickGagnon's full-sized avatar

Yannick Gagnon YannickGagnon

View GitHub Profile
@YannickGagnon
YannickGagnon / gist:6055968
Created July 22, 2013 17:49
Mootools Custom Events - Swipe
/*
---
name: Swipe
description: Provides a custom swipe event for touch devices
authors: Christopher Beloch (@C_BHole), Christoph Pojer (@cpojer), Ian Collins (@3n)
license: MIT-style license.
@YannickGagnon
YannickGagnon / ViewController.Delegate.js
Last active December 17, 2015 01:09
Moobile ViewController Delegate Pattern
Class.refactor(Moobile.ViewController, {
_delegate: null,
setDelegate: function(delegate) {
this._delegate = delegate;
},
respondsToFunction: function(functionName) {
return typeof this._delegate[functionName] === 'function';
@YannickGagnon
YannickGagnon / migrationManager.js
Created April 5, 2013 16:21
HTML5 WebSql Database Migration
var migrationManager = (function() {
/**
* Our db instance
* @type {Database}
*/
var db = null;
/**
* Our versions, add a version when needed