zurb/foundation-rails — pull request #79 by benfastmodel (2014-03-31 03:25:06+00:00)
Title: Fixed problems with nested modals

I'm developing a workflow which utilizes "nested", ajax-loaded reveal modals (prior modals are restored in a "closed" handler). In the process, I encountered and fixed some problems in Foundation Reveal:
1) Elements loaded via ajax didn't get their foundation elements initialized
2) Repeated switching between modals could leave the background out of sync (i.e. visible when no modal was visible)
3) Strange things can happen if page accidentally contains multiple instances of the modal's "mount point"

I made the fixes here because I'm working in Rails. Please let me know if I should also submit this patch to the master version of Foundation.