Skip to content

Instantly share code, notes, and snippets.

@DanWebb
DanWebb / jquery.ba-tinypubsub.js
Last active August 29, 2015 14:05 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
@DanWebb
DanWebb / jsonp.js
Last active August 29, 2015 14:24 — forked from gf3/jsonp.js
JSONP in plain JS
/**
* loadJSONP( url, hollaback [, context] ) -> Null
* - url (String): URL to data resource.
* - hollaback (Function): Function to call when data is successfully loaded,
* it receives one argument: the data.
* - context (Object): Context to invoke the hollaback function in.
*
* Load external data through a JSONP interface.
*
* ### Examples