Sha256: 6bf3af4ad11f31adc73f23997ad5a3991b7cbe1340faa2c8518e5b23cf8e10c0
Contents?: true
Size: 1.17 KB
Versions: 8
Compression:
Stored size: 1.17 KB
Contents
if (typeof(Alchemy) === 'undefined') { var Alchemy = {}; } (function ($) { var Growler = {}; $.extend(Alchemy, Growler); Alchemy.Growler = { build:function (message, flash_type) { var $flash_container = $('<div class="flash ' + flash_type + '" />'); var icon_class = flash_type === 'notice' ? 'tick' : flash_type; $flash_container.append('<span class="icon ' + icon_class + '" />'); $flash_container.append(message); $('#flash_notices').append($flash_container); $('#flash_notices').show(); Alchemy.Growler.fade(); }, fade:function () { $('#flash_notices div[class="flash notice"]').delay(5000).hide('drop', { direction:"up" }, 400, function () { $(this).remove(); }); $('#flash_notices div[class!="flash notice"]') .css({cursor:'pointer'}) .click(function () { $(this).hide('drop', { direction:"up" }, 400, function () { $(this).remove(); }); }); } }, Alchemy.growl = function (message, style) { if (typeof(style) === 'undefined') { style = 'notice'; } Alchemy.Growler.build(message, style); } })(jQuery);
Version data entries
8 entries across 8 versions & 1 rubygems