Sha256: ed37f8c980dd71f372f083cac9c84dc711e3ce5ab15c3aa02c4801d78eb6f85c
Contents?: true
Size: 1.16 KB
Versions: 21
Compression:
Stored size: 1.16 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
21 entries across 21 versions & 1 rubygems