]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fixes #7880, improves fallback for data-closable elements, if no parameter passed...
authorChris Oyler <chris@zurb.com>
Thu, 14 Jan 2016 21:28:31 +0000 (13:28 -0800)
committerChris Oyler <chris@zurb.com>
Thu, 14 Jan 2016 21:28:31 +0000 (13:28 -0800)
js/foundation.util.triggers.js

index 52369027031ec2de8aad1368a0e114d1635d7ae3..46cb971dc3f868f03374bd23b39c81bb5a1994b4 100644 (file)
@@ -27,8 +27,9 @@
   // Elements with [data-closable] will respond to close.zf.trigger events.
   $(document).on('close.zf.trigger', '[data-closable]', function(e){
     e.stopPropagation();
-    var animation = $(this).data('closable') || 'fade-out';
-    if(Foundation.Motion){
+    var animation = $(this).data('closable');
+
+    if(animation !== ''){
       Foundation.Motion.animateOut($(this), animation, function() {
         $(this).trigger('closed.zf');
       });