Skip to content

Instantly share code, notes, and snippets.

@silentrob
Forked from wycats/compare.js
Created December 2, 2009 23:21
Show Gist options
  • Save silentrob/247709 to your computer and use it in GitHub Desktop.
Save silentrob/247709 to your computer and use it in GitHub Desktop.
// 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) })
// XUI
x$(window).xhrjson( "/your/mom", {map:{'contents':'#lightbox_content'} });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment