Rasanga / FlashAlertBundle

Simplified way to handle (add/display) Symfony flash messages. Client side scripts are written in pure JavaScript. https://packagist.org/packages/ras/flash-alert-bundle
http://rasanga.github.io/FlashAlertBundle
MIT License
23 stars 8 forks source link

Auto hide #16

Open defixje opened 8 years ago

defixje commented 8 years ago

Is there a way to auto hide the flash alerts after some seconds?

Porygoon commented 7 years ago

In your .twig file: <div class="flashMessage"> {{ render_flash_alerts() }} </div>

In a .js file: $('.flashMessage').delay(5000).slideUp(600);

The flash message will be show for 5s and slowly disappear in 600ms