Skip to content

Instantly share code, notes, and snippets.

@kevinvaldek
Forked from wycats/compare.js
Created December 2, 2009 23:23
Show Gist options
  • Save kevinvaldek/247714 to your computer and use it in GitHub Desktop.
Save kevinvaldek/247714 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) })
// mootools
new Request.JSON({ url: '/your/mom', onSuccess: function(json) { $('lightbox_content').set('html', json.contents) } })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment