Skip to content

Instantly share code, notes, and snippets.

@seanhandley
Created March 15, 2010 14:02
Show Gist options
  • Save seanhandley/332854 to your computer and use it in GitHub Desktop.
Save seanhandley/332854 to your computer and use it in GitHub Desktop.
#flash
- flash.each do |key, value|
%div{:class => key, :id => "flash_#{key}"}= value
:javascript
Event.observe(window, 'load', function() {
$('flash_#{key}').fade({ duration: 3.0 });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment