Created
January 9, 2009 20:22
-
-
Save mig/45261 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.notice, | |
div.warning, | |
div.error { | |
font-size: 18px; | |
padding: 15px 10px; | |
margin-bottom: 10px; | |
} | |
div.notice span, | |
div.warning span, | |
div.error span { | |
float: left; | |
width: 42px; | |
height: 32px; | |
margin-top: -5px; | |
} | |
div.notice { | |
color: #41612f; | |
} | |
div.warning { | |
color: #a26a1a; | |
} | |
div.error { | |
color: #af0100; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flashFade = function() { | |
$("div.flash").fadeOut(1500); | |
} | |
$(document).ready(function() { | |
setTimeout(flashFade, 5000); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def happy_flash | |
returning html = "" do | |
flash.each do |k,v| | |
html << "<div class='#{k} flash'>#{v}</div>" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment