Sha256: b8356eced2b79992c3531b8c432a191636c29daddbb7517854ca2cadb5f0fccb
Contents?: true
Size: 548 Bytes
Versions: 52
Compression:
Stored size: 548 Bytes
Contents
showTime = 5000 fadeOutTime = 500 $ -> # Make flash messages dissapear # We only want to target the flash messages which are initially on the page. # Otherwise we risk hiding messages added by show_flash $initialFlash = $(".flash") setTimeout (-> $initialFlash.fadeOut(fadeOutTime) ), showTime window.show_flash = (type, message) -> $flashWrapper = $(".js-flash-wrapper") flash_div = $("<div class=\"flash #{type}\" />") $flashWrapper.prepend(flash_div) flash_div.html(message).show().delay(showTime).fadeOut(fadeOutTime)
Version data entries
52 entries across 52 versions & 1 rubygems