Skip to content

Instantly share code, notes, and snippets.

@jwo
Created July 5, 2011 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwo/1065693 to your computer and use it in GitHub Desktop.
Save jwo/1065693 to your computer and use it in GitHub Desktop.
Drop Down and Fade out Flash Messages
/* flash-messages
#flash
left: 0
margin: 0 auto
position: absolute
text-align: center
top: 0
width: 100%
z-index: 1000
.flash,#flash
.message
text-align: center
margin: 0 auto
.error,.alert
border: 1px solid #fbb
background-color: #fdd
.warning
border: 1px solid #fffaaa
background-color: #ffffcc
.notice
border: 1px solid #1FDF00
background-color: #BBFFB6
.error,.alert,.warning,.notice
padding: 1.0em
#flash
- flash.each do |key, value|
.message{ :class => key }
%p= value
$("#flash").fadeIn(function() {
fadeOut = function() {
$("#flash").fadeOut();
};
setTimeout(fadeOut, 3000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment