]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Actually allow reveal configs to be overriden on subsequent $.fn.foundation calls.
authorJordan Humphreys <jordan@mailyard.net>
Tue, 12 Mar 2013 21:45:35 +0000 (14:45 -0700)
committerJordan Humphreys <jordan@mailyard.net>
Tue, 12 Mar 2013 21:45:35 +0000 (14:45 -0700)
docs/layout.html.erb
js/foundation/foundation.reveal.js

index 668df190386dd11463c0a2617cfd8070d1709d54..4a98fc03ae227c8279ba502e8c6b483b9719c4f9 100644 (file)
     </script>
     <script src="<%= asset_path %>/docs.js"></script>
     <script>
-    $(document).ready(function() {
-      $(document).foundation().foundation('reveal', {
-        closeOnBackgroundClick: false
-      });
-    });
+      $(document).foundation();
     </script>
   </body>
 </html>
index 83f655406de2ff8e78f01c5ae6eb1c80be5756a1..8f022a6e53206025717dedcf12e410c8158775d0 100644 (file)
@@ -6,7 +6,7 @@
   Foundation.libs.reveal = {
     name: 'reveal',
 
-    version : '4.0.4',
+    version : '4.0.6',
 
     locked : false,
 
@@ -44,7 +44,7 @@
       }
 
       if (typeof method != 'string') {
-        if (!this.settings.init) this.events();
+        this.events();
 
         return this.settings.init;
       } else {
@@ -56,6 +56,7 @@
       var self = this;
 
       $(this.scope)
+        .off('.fndtn.reveal')
         .on('click.fndtn.reveal', '[data-reveal-id]', function (e) {
           e.preventDefault();
           if (!self.locked) {
@@ -76,6 +77,8 @@
         .on('close.fndtn.reveal', '.reveal-modal', this.settings.close)
         .on('closed.fndtn.reveal', '.reveal-modal', this.settings.closed)
         .on('closed.fndtn.reveal', '.reveal-modal', this.close_video);
+
+      return true;
     },
 
     open : function (target) {