Skip to content

Instantly share code, notes, and snippets.

View masqita's full-sized avatar

Peter De Berdt masqita

View GitHub Profile
@masqita
masqita / compare.js
Created December 3, 2009 08:01 — forked from wycats/compare.js
// prototype
new Ajax.Request("/your/mom", onSuccess: function(response) { $("lightbox_content").innerHTML = response.responseJSON.contents })
// jquery
$.getJSON("/your/mom", function(json) { $("#lightbox_content").html(json.contents) })
// prototype sprinkled with a bit of love (last command out of my head)
// Helpers to make JSON requests a bit cleaner.
Ajax.Json = {