Sha256: 03bc4935bdec87e065a4b61b8a57fd1fb486c8feedc41557a3cdea35c8dc2c5b
Contents?: true
Size: 735 Bytes
Versions: 6
Compression:
Stored size: 735 Bytes
Contents
// // Adding some animation to flash messages // Idea from http://stackoverflow.com/questions/316278/timeout-jquery-effects // // Copyright (c) 2011 Kosmas Schütz // (function($) { // Parameters are: // time for fadeIn // time the message is shown // time for fadeOut $.fn.flashMessages = function(timeIn, timeStay, timeOut) { var el = $(this.selector + " .success, " + this.selector + " .notice, " + this.selector + " .warning, " + this.selector + " .error"); el.fadeIn(timeIn); el.queue(function() { setTimeout(function() { el.dequeue(); }, timeStay); }); el.fadeOut(timeOut); }; })(jQuery);
Version data entries
6 entries across 6 versions & 1 rubygems