FlashMsg for jQuery

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">
$(function() {

	// Display a message on load.




Displays the specified message. It's equivalent to calling jQuery.flashMsg('show', msg).

jQuery.flashMsg('setup', options)

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
jQuery.flashMsg('show', msg)

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.