summaryrefslogtreecommitdiff
path: root/website/static/js/foundation3/jquery.foundation.alerts.js
diff options
context:
space:
mode:
authorJayaram Pai2013-11-19 17:51:06 +0530
committerJayaram Pai2013-11-19 17:51:06 +0530
commit9c50efc99b64350c66c92321b7f9d565e4da611c (patch)
treea92522f904b41ac9fba070a5c71cc9ee3b85286b /website/static/js/foundation3/jquery.foundation.alerts.js
parent36228d2bc0d1301775ded964a3fa67f2e844a126 (diff)
downloadSciPy2013-9c50efc99b64350c66c92321b7f9d565e4da611c.tar.gz
SciPy2013-9c50efc99b64350c66c92321b7f9d565e4da611c.tar.bz2
SciPy2013-9c50efc99b64350c66c92321b7f9d565e4da611c.zip
testing ie8 index
Diffstat (limited to 'website/static/js/foundation3/jquery.foundation.alerts.js')
-rw-r--r--website/static/js/foundation3/jquery.foundation.alerts.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/website/static/js/foundation3/jquery.foundation.alerts.js b/website/static/js/foundation3/jquery.foundation.alerts.js
new file mode 100644
index 0000000..7446160
--- /dev/null
+++ b/website/static/js/foundation3/jquery.foundation.alerts.js
@@ -0,0 +1,20 @@
+;(function ($, window, undefined) {
+ 'use strict';
+
+ $.fn.foundationAlerts = function (options) {
+ var settings = $.extend({
+ callback: $.noop
+ }, options);
+
+ $(document).on("click", ".alert-box a.close", function (e) {
+ e.preventDefault();
+ $(this).closest(".alert-box").fadeOut(function () {
+ $(this).remove();
+ // Do something else after the alert closes
+ settings.callback();
+ });
+ });
+
+ };
+
+})(jQuery, this);