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

Home Page:http://rasanga.github.io/FlashAlertBundle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto hide

defixje opened this issue · comments

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

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