]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
adds panel and callout for usingn ajax content for reveal
authorzurbchris <chris@zurb.com>
Fri, 20 Nov 2015 19:53:49 +0000 (11:53 -0800)
committerzurbchris <chris@zurb.com>
Fri, 20 Nov 2015 19:53:49 +0000 (11:53 -0800)
docs/pages/reveal.md

index a76e7ff76d4cca04dd1ccc51626a8a7efb082a7e..27c4cde9dbb6da3e01abeacdf89b47d785a74100 100644 (file)
@@ -8,10 +8,15 @@ tags:
   - modal
 ---
 
+
 ## Basics
 
 A modal is just an empty container, so you can put any kind of content inside it, from text to forms to a whole grid.
 
+<div class="callout primary">
+  <p>Please note that we removed the option for AJAX loaded modals in Foundation 6. We did make it very easy to implement on your own though, check out a sample in the <span><a href="#advanced">Advanced</a></span> section.</p>
+</div>
+
 ```html_example
 <p><a data-open="exampleModal1">Click me for a modal</a></p>
 
@@ -169,6 +174,19 @@ To use animations from the Motion UI library, include the <code>data-animation-i
   </button>
 </div>
 ```
+
+## Advanced
+
+To use AJAX to load your modal content, use the code snippet below.
+
+```js
+var $modal = $('#modal');
+
+$.ajax({'/url'})
+  .done(function(resp){
+    $modal.html(resp.html).foundation('open');
+});
+```
 ## Accessibility
 
 Mostly handled by Foundation JS now...