Displays a non-modal message for a certain ammount of time in the center of the page.
In your page you need to include jQuery, the FlashMsg JavaScript file and the FlashMsg CSS file. In the following sample you can see how it looks:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="jquery-flashmsg.js"></script>
<link rel="stylesheet" href="css/style.css?v=1">
<script>
$(function() {
// Display a message on load.
$.flashMsg('');
});
</script>
Displays the specified message. It's equivalent to calling jQuery.flashMsg('show', msg).
Initializes the message display. If you don't call it, it will be initialized using the default settings. You can specify any of the following options:
| Parameter | Type | Default | Description |
|---|---|---|---|
| id | string | "flashMsg" | Id of the message display. |
| displayTime | int | 5000 | Time to display the message in milliseconds. By default it's 5 seconds. |
| opacity | double | 0.8 | Opacity of the message display. 0-1 |
Displays the specified message.
Hides the message display.
You may use any FlashMsg under the terms of either the MIT License or the GNU General Public License (GPL) Version 2.