README.md in bootstrap_flash_messages-1.0.1 vs README.md in bootstrap_flash_messages-1.0.2
- old
+ new
@@ -1,8 +1,8 @@
# bootstrap_flash_messages
- version 1.0.1
+ version 1.0.2
Robin Brouwer
Bootstrap alerts and Rails flash messages combined in one easy-to-use gem.
@@ -21,10 +21,18 @@
And that's it!
## Changes
+Version 1.0.2 changes (05/08/2015):
+
+ - Added :fade_in.
+
+Version 1.0.1 changes (02/08/2015):
+
+ - Made 'info' the default class.
+
Version 1.0.0 changes (31/01/2014):
- Added Boostrap 3 support.
- Added default locales for the flash messages.
- Removed the 'convert_newlines' option and added 'simple_format'.
@@ -157,9 +165,30 @@
<%= flash_messages(:close) %>
If you'd like for the flash message to fade out when you click on the close icon, you can pass in the `:fade` option. This requires `:close` to work, obviously.
<%= flash_messages(:close, :fade) %>
+
+If you'd like for the flash message to also fade in, you can pass in the `:fade_in` option.
+
+ <%= flash_messages(:close, :fade, :fade_in) %>
+
+ # Also add something like this to application.js:
+ window.setTimeout(function() {
+ $(".alert").addClass("in");
+ }, 1000);
+
+ # If you didn't add the "Component Animations" to your Bootstrap configuration, add this to application.css:
+ .alert.fade {
+ opacity: 0;
+ -webkit-transition: opacity 0.15s linear;
+ -moz-transition: opacity 0.15s linear;
+ -o-transition: opacity 0.15s linear;
+ transition: opacity 0.15s linear;
+ }
+ .alert.fade.in {
+ opacity: 1;
+ }
Want a heading? Add `:heading`. The headings inside flash.en.yml are used for the headings.
<%= flash_messages(:close, :heading) %>
\ No newline at end of file