Created — forked from jeduan/reveal_ajax.js

Use Zurb reveal with ajax

  • Download Gist
1 2 3 4 5 6 7 8
$('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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.