This is a Customizable jQuery library for web applications flash messages & notifications to create instantly flash messages by only including one file !
Requirements:
- JQuery version > 2.2.0
- Include the flash.js or flash.min.js after the JQuery script
To create your first message call the function flash()
flash( 'Hello flash.js Users !' ) ;
Default options :
$options = {
'bgColor' : '#5cb85c', //Background Color (any CSS color)
'duration' : 4000, //Duration of the message (ms)
'ftColor' : 'white', //Font color (any CSS color)
'vPosition' : 'bottom', //Vertical position of the message (bottom or top)
'hPosition' : 'right', //Horizontal position of the message (right or left)
'fadeIn' : 400, //Fade in time (ms)
'fadeOut' : 400, //Fade out time (ms)
'clickable' : true, //Hide message when it is clicked
'autohide' : true //Autohide message after the duration time
};
To create a custom message pass an object as a sescond parameter in the flash() function :
flash('Custom Message', {
'bgColor' : 'tomato',
'duration' : 10000,
'vPosition' : 'top',
});
MIT