Skip to content

Instantly share code, notes, and snippets.

@tpitale
Created August 12, 2009 22:09
Show Gist options
  • Select an option

  • Save tpitale/166814 to your computer and use it in GitHub Desktop.

Select an option

Save tpitale/166814 to your computer and use it in GitHub Desktop.
;(function($) {
$.fn.gistify = function() {
return this.each(function() {
this.innerHTML = 'Loading Gist '+this.id;
$.getJSON("http://gist.github.com/"+ this.id +".json?callback=?", function (gist) {
$('#'+gist.repo).replaceWith(gist.div);
});
});
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment