Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Use Zurb reveal with ajax
$('a.reveal').click(function(event) {
var $div = $('<div>').addClass('reveal-modal').appendTo('body'),
$this = $(this);
$.get($this.attr('href'), function(data) {
return $div.empty().html(data).append('<a class="close-reveal-modal">&#215;</a>').reveal();

Hello, I am not 100% sure if this will work for what I am doing because I'm mor of a hack than a programmer, but I am trying to load an ajax form response into a Zurb Reveal modal after a form submission (the form is in the reveal window, and I want the response back in the same reveal) - should this do the trick? If so, would you mind taking a quick gander at what I've done and letting me know what the heck I've missed?

The page I'm using it on is here: - just go down the page to the green bar that has a button that says "find out more" - when you click on that it launches the form in a reveal window...

Any help would be highly appreciated!
Greg Thibodeaux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment