Alert bootstrap fade out


I have the following alert using bootstrap.

I’m hoping that the Lord will fade out after two seconds.

Here’s the code I have:

<div class="alert alert-success" role="alert" data-auto-dismiss="2000">

<span> <?=$message ?> </span>


How do I do this?


Have you installed/included the “bootstrap auto dismiss alerts” plugin? If so it should just work.


I just tried what you suggested it seems not to be working.

If I installed Bootstrap latest version.

Should I have this functionality? Or do I need to install on top of Bootstrap this plug-in


You need both bootstrap and the plugin