Skip to content

Instantly share code, notes, and snippets.

😅
err != nil

Chris Roche rodaine

😅
err != nil
Block or report user

Report or block rodaine

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
@rodaine
rodaine / accordion.coffee
Last active Dec 16, 2015
Code Snippets for my blog post "Unchain HTML and JavaScript using Dependency Injection" (http://clarknikdelpowell.com/blog/untangle-html-and-javascript-using-dependency-injection/)
View accordion.coffee
$('#browsers, #web-team').on 'click', 'li', (e) ->
# get the clicked li as a jQuery object
$el = $ this
# get the whole list as a jQuery object
$delegate = $ e.delegateTarget
# the class to be toggled on the element
cls = 'active'
@rodaine
rodaine / boilerplate.jquery.js
Created May 15, 2012
JavaScript: jQuery Plugin Boilerplate [$.method()]
View boilerplate.jquery.js
// based off Nettuts+ article by Jonathan Cutrell:
// "14 Reasons Why Nobody Used Your jQuery Plugin"
// http://goo.gl/yx8up
;(function($, window, undefined){ "use strict";
if (!$.myPlugin) $.myPlugin = function(opts) {
var defaults = {
//plugin defaults
};
@rodaine
rodaine / boilerplate.jquery.js
Created May 15, 2012
JavaScript: jQuery Plugin Boilerplate [$(selector).method()]
View boilerplate.jquery.js
// based off Nettuts+ article by Jonathan Cutrell:
// "14 Reasons Why Nobody Used Your jQuery Plugin"
// http://goo.gl/yx8up
;(function($, window, undefined){ "use strict";
$.fn.myPlugin = function(opts) {
var defaults = {
//plugin defaults
};
You can’t perform that action at this time.