diff options
author | Kenton Hamaluik <kenton@hamaluik.com> | 2014-01-22 13:20:50 -0700 |
---|---|---|
committer | Kenton Hamaluik <kenton@hamaluik.com> | 2014-01-22 13:20:50 -0700 |
commit | abf580866624bfeec53d948894ba02fe4ee307fd (patch) | |
tree | 293847ec012f51ffb01cce3de0fd2a198f5943a5 /foundation-default-colours/static/js/foundation/foundation.alert.js | |
parent | 6b057e4f9bb931e2db52c49a84bbe457f9f3910e (diff) | |
download | pelican-themes-abf580866624bfeec53d948894ba02fe4ee307fd.tar.gz |
Added Zurb Foundation 5.0.1 theme.
Diffstat (limited to 'foundation-default-colours/static/js/foundation/foundation.alert.js')
-rw-r--r-- | foundation-default-colours/static/js/foundation/foundation.alert.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/foundation-default-colours/static/js/foundation/foundation.alert.js b/foundation-default-colours/static/js/foundation/foundation.alert.js new file mode 100644 index 0000000..1bb404a --- /dev/null +++ b/foundation-default-colours/static/js/foundation/foundation.alert.js @@ -0,0 +1,34 @@ +;(function ($, window, document, undefined) { + 'use strict'; + + Foundation.libs.alert = { + name : 'alert', + + version : '5.0.0', + + settings : { + animation: 'fadeOut', + speed: 300, // fade out speed + callback: function (){} + }, + + init : function (scope, method, options) { + this.bindings(method, options); + }, + + 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'); + + e.preventDefault(); + alertBox[settings.animation](settings.speed, function () { + $(this).trigger('closed').remove(); + settings.callback(); + }); + }); + }, + + reflow : function () {} + }; +}(jQuery, this, this.document)); |