-
-
Save ericcholis/3938397 to your computer and use it in GitHub Desktop.
Use Zurb reveal with ajax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('a.reveal').click(function(event) { | |
event.preventDefault(); | |
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">×</a>').reveal(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: http://tinyurl.com/99c9krn - 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