Skip to content

Instantly share code, notes, and snippets.

Eli Dupuis elidupuis

Block or report user

Report or block elidupuis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View qcycle-calling-it.js
toLoad: images,
cycleOpts: {
fx: 'fade',
timeout: 3*1000,
pager: '#pagers'
createSlide: function (img) {
var data ='qCycle.slideData');
var slide = $('<div>').addClass('slide').append($(img).attr('alt',data.title));
View jquery-plugin-pattern.js
(function($) {
$.fn.thePlugin = function(options) {
// build main options before element iteration:
var opts = $.extend({}, $.fn.thePlugin.defaults, options);
var $this = $(this);
var thePlugin = {
index: 0,
elidupuis / safari_search_input
Created Nov 18, 2010
Make Safari render an search input as a regular text input
View safari_search_input
input[type="search"] { -webkit-appearance: textfield; }
elidupuis / jquery_plugin_template.js
Created Dec 17, 2010
A base structure to use when building new plugins!
View jquery_plugin_template.js
(function($) {
var methods = {
init: function( options ) {
// iterate and reformat each matched element
return this.each(function() {
var $this = $(this),
opts = $.extend({}, $.fn.PLUGIN_NAME.defaults, options),
data = $'PLUGIN_NAME');
elidupuis / jquery.equalizeHeights.js
Created Feb 28, 2011
Simple plugin to equalize the heights of selected elements
View jquery.equalizeHeights.js
// stolen from
// usage: $('div').equalizeHeights();
$.fn.equalizeHeights = function(){
return this.height( Math.max.apply( this, $(this).map(function(i,e){ return $(e).height() }).get() ) );
elidupuis /
Created Apr 8, 2011
Usage examples of the jquery.purrrify plugin
// this will trigger purrrify when $('#myTrigger') is clicked:
trigger: { selector: '#myTrigger', event: 'click' }
elidupuis / bookmarklet.js
Created May 13, 2011
How to create a bookmarklet with an external js file.
View bookmarklet.js
// use this code as your href attribute on your 'Install this bookmarklet' anchor tag.
// borrowed from
javascript:(function(){var jsCode = document.createElement('script');jsCode.setAttribute('src', '');document.body.appendChild(jsCode);}());
elidupuis / jquery.matchWidth.js
Created Aug 10, 2011
jquery plugin to set the width of an element to the sum of it's children's width
View jquery.matchWidth.js
$.fn.matchWidth = function(){
// Prepare
var $this = $(this);
// Action
var w = 0;
w += $(this).outerWidth(true);
elidupuis / handlebars-helpers.js
Last active May 25, 2019
Simple Handlebars.js helpers
View handlebars-helpers.js
/*! ******************************
Handlebars helpers
// debug helper
// usage: {{debug}} or {{debug someValue}}
// from: @commondream (
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
elidupuis /
Created Dec 6, 2012
D3 + Albers + zoom behavior

Alberta Aboriginal Treaty Lands.

You can’t perform that action at this time.