I have this piece of code in my layout from the tutorial at http://www.communityguides.eu/articles/18 with instructions on how to add fadeout to a bootstrap flash message.
<% flash.each do |key, value| %>
<div class="alert alert-block alert-<%= key == :notice ? "success" : key %>" data-dismiss="alert">
<a class="close">×</a>
<h4 class="alert-heading"><%= key.capitalize %>:</h4>
<%= value %>
</div>
<% end %>
Then the following in a coffeescript file,
$ ->
$(".fadeout").delay(5000).fadeOut(1000);
The author’s instructions says to add “add a class fadeout to the div” and I have tried everything I know of and cant get it to work. Can someone show me where to add .fadeout to the layout?
Well I am not a ruby guy
But if I am not wrong, you can add the class to the div at the line
i.e