]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Update foundation.alert.js 3861/head
authorlittlexiang <littlexiang521@gmail.com>
Wed, 11 Dec 2013 04:26:24 +0000 (12:26 +0800)
committerlittlexiang <littlexiang521@gmail.com>
Wed, 11 Dec 2013 04:26:24 +0000 (12:26 +0800)
fix on-the-fly alert

js/foundation/foundation.alert.js

index 7350578adc40664b317388a42fcd18ad37e8ecc0..569d40e9a1ba7fb0761d4ec164bf4a2390d04345 100644 (file)
@@ -19,7 +19,7 @@
     events : function () {
       $(this.scope).off('.alert').on('click.fndtn.alert', '[data-alert] a.close', function (e) {
           var alertBox = $(this).closest("[data-alert]"),
-              settings = alertBox.data('alert-init');
+              settings = alertBox.data('alert-init') || Foundation.libs.alert.settings;
 
         e.preventDefault();
         alertBox[settings.animation](settings.speed, function () {
@@ -31,4 +31,4 @@
 
     reflow : function () {}
   };
-}(jQuery, this, this.document));
\ No newline at end of file
+}(jQuery, this, this.document));