Web Tips
Sharing our knowledge of CFML & jQuery and many other web development tips.
Sharing our knowledge of CFML & jQuery and many other web development tips.
Inspired by a similar feature at Twitter.com, this jQuery Plugin will help you display messages at the top of your page with an assortment of options.
Download the latest version 2.1 of the plugin at http://showMessage.dingobytes.com/download/
Please see the site, as the information below is for previous versions. This has been updated!
This is my first attempt at a jQuery Plugin, so although it works fine for my liking, I am sure there are many things that can be done more effectively.You can install showMessage jQuery Plugin by including the script somewhere in the page AFTER jQuery. This plugin should work on jQuery version 1.3.2+.
<script type="text/javascript" src="/path/to/jquery.showMessage.min.js" charset="utf-8"><\/script>
If you wish to style the text, the message is displayed through an unordered list in the div with id attribute=showMessage
#showMessage li
{
font-family: Arial, Helvetica, clean, sans-serif;
font-size: large;
font-weight: bold;
color: red;
}
Here are the possible options with their default values:
thisMessage: [''], backgroundColor: '#F7F7F7', color: '#000000', opacity: 90, displayNavigation: true, autoClose: false, delayTime: 5000
jQuery.showMessage({
'thisMessage':['<mg src="/images/accept.png" alt="accept"/>successful!']
});
var returnMessage = ['Account was created successfully!','Thank you.'];
jQuery.showMessage({
'thisMessage': returnMessage,
'backgroundColor': '#f7f7f7',
'color': 'black',
'opacity': 95,
'displayNavigation': false,
'autoClose': true,
'delayTime': 6000
});
Pingback: dingobytes » Blog Archive » Show Message 1.0- jQuery Plugin for … » KHMER855.COM
Pingback: Tweets that mention dingobytes » Blog Archive » Show Message 1.0- jQuery Plugin for displaying messages -- Topsy.com